Starting from:
$35

$29

Assignment 3: Basic programming in MIPS assembly Solution

Write a MIPS assembly program which does the following:
It accepts the following inputs
 (number of integers)
  –  a list of  integers (to be stored in the data segment of your program
  –  a “small” positive integer
Your program finds the th largest value in the list and outputs it. The time complexity of your algo should be O(). 

Note that what’s required is the th largest value, not the value of the th largest integer.

A sample run is shown below.

Program:     Enter No. of integers in list
User:         12
Program:     Enter list
User:          5,  9,  -11,  27,  3,  -2,  8,  305,  27,  15,  -7,  0
Program:     Enter (a  positive integer)
User:          3
Program:     15

Input constraints: 1<=n<=50 and 1<=k<=5.

More products