Question: Create a program that uses a recursive function to check whether a number is in a list of Sorted numbers. In order to understand recursion
Create a program that uses a recursive function to check whether a number is in a list of
Sorted numbers.
In order to understand recursion read your note from pre-requisite course (district math)
Specifications
The program should begin by generating list of 10 random numbers from 1 to 100.
The program should allow the user to enter a number from 1 to 100. Then, it should display whether that number is or isnt in the list of random numbers.
Use binary search algorithm to search the list of random numbers
Sample console output
Binary Search
Enter 'x' to exit
Random numbers: [13, 16, 18, 29, 32, 71, 71, 77, 78, 90]
Enter a number from 1 to 100: 1
1 is NOT in random numbers.
Enter a number from 1 to 100: 32
32 is in random numbers.
Enter a number from 1 to 100: 100
100 is NOT in random numbers.
Design: Draw an UML class diagram for the class and coding
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
