I converted C code to MIPS Assembly to sort given array, but the code is not really sorting. Here is the C code:
int partition(int v[], int a, int b) {