3.3 Find Min, Max, Mode and Median Define an integer array (unsorted) in your data segment, and write an assembly program to find the minimum,

Answered step by step
Verified Expert Solution
Question
55 users unlocked this solution today!

3.3 Find Min, Max, Mode and Median

Define an integer array (unsorted) in your data segment, and write an assembly program to find the minimum, maximum, mode and median of the array. Note that you may want to sort the array first, because once the array is sorted, minimum, maximum and median are just numbers at certain indices. You can use your merge sort code. However, if you find it difficult to implement merge sort, just use a sort algorithm that is simpler to implement (e.g., bubble sort). Results should be saved in a pre-defined memory space.

You can define your input in the data segment as shown below:

.data

nums: .word 92, 31, 92, 6, 54, 54, 62, 33, 8, 52

length: .word 10

min: .word 0

max: .word 0

median: .word 0

In this example, you should save the minimum, maximum and median to the memory space pointed by the labels min", max" and median", respectively. Normally, for an even size array the median is defined as the average of the two numbers in the middle. For simplicity, you can just take the number at index [length/2].

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Link Copied!

Step: 1

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

100% Satisfaction Guaranteed-or Get a Refund!

Step: 2Unlock detailed examples and clear explanations to master concepts

blur-text-image_2

Step: 3Unlock to practice, ask and learn with real-world examples

blur-text-image_3

See step-by-step solutions with expert insights and AI powered tools for academic success

  • tick Icon Access 30 Million+ textbook solutions.
  • tick Icon Ask unlimited questions from AI Tutors.
  • tick Icon Order free textbooks.
  • tick Icon 100% Satisfaction Guaranteed-or Get a Refund!

Claim Your Hoodie Now!

Recommended Textbook for

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books
flashcard-anime

Study Smart with AI Flashcards

Access a vast library of flashcards, create your own, and experience a game-changing transformation in how you learn and retain knowledge

Explore Flashcards

Students Have Also Explored These Related Databases Questions!