Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Help me Translate the C statements below into MIPS assembly code

include
#include
using namespace std;
void shift(int a[], int i, int n){
int j = 2 * i;
int k = a[i];
while(j <= n){
if(j<n && a[j] < a[j+1])
j++;
if( k >= a[j])
break;
else {
a[j/2] = a[j];
a[j] = k;
j *= 2;
}
}
}
void makeHeap(int a[], int n){
int i;
for (i=n/2;i>=0;i
Sign In or Register to comment.