Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

/******************************** * Week 4 lesson:

Design and implement an algorithm that, when given a collection of integers in an unsorted array, determines the third smallest number (or third minimum). For example, if the array consists of the values 21, 3, 25, 1, 12, and 6 the algorithm should report the value 6, because it is the third smallest number in the array. Do not sort the array.

To implement your algorithm, write a function thirdSmallest that receives an array as a parameter and returns the third-smallest number. To test your function, write a program that populates an array with random numbers and then calls your function.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question