Question: COMP-370 Algorithms Spring 2021 Homework 1 1. Write a program using either Java, C/C++ or Python, that implements the two solutions discussed in class that
COMP-370 Algorithms Spring 2021 Homework 1 1. Write a program using either Java, C/C++ or Python, that implements the two solutions discussed in class that solve the selection problem, let k = N/2. Draw a table showing the running time of your program for various values of N starting from at least 10 and going at least up to 10% le.g., 10, 10, 10", 10", etc). When submitting your report, mention the CPU of your computer (e.g., model, #cores, clock speed). int x) which returns the 2. Using recursion write a function int countx (int n, occurrences of Xin the N. For example: countX (25350, 5) - 2 countx (33331, 3) = 4 countx (99485, 7) - 0 3. Prove by induction that: for all nez 1+4+7+(3-2) 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
