Question: Write a complete program in MIPS assembly language that implements the selection sort algorithm to sort an array of integers in both ascending and descending
Write a complete program in MIPS assembly language that implements the selection sort algorithm to sort an array of integers in both ascending and descending order. The program must be based on the C code presented below.


main) int j, k, temp, min, direction; int length 9; int list17, 9. 4, 3, 8. 1, 6, 2, 5; printf("Enter 0 to sort in descending order.In"); printf("Any number different than 0 will sort in ascending order.In") scanf ("%d", &direction); printf ("Before Sort:n"); printData(list, length); for k0; kin ); else return( j min ); printData( int thelist[], int size ) int k; for( k = 0; k
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
