Question: Use phyton or Java to write the code. Problem 3. (20 points) Use selection (i.e. average runtime of O(n)) to find the ith smallest number.

Use phyton or Java to write the code.
Problem 3. (20 points) Use selection (i.e. average runtime of O(n)) to find the ith smallest number. The first number in the text file (on its own line) will be i. The second line will the the array of number which you want to find the ith smallest. You may assume the array contains only integers. Sample output.txt (single number only): 4 Sample input.txt (first line will be the integer i, second line will be array with spaces between elements (no space after last)): 7 4 5 8 2 4 7 5 0 8 2 3 9 23 48 -12 49
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
