Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How to add this last part below to the code In the last part of the assignment, you need to compute the time taken to
How to add this last part below to the codeĀ
In the last part of the assignment, you need to compute the time taken to complete a particular algorithm. You should show the total amount of time it took to execute the code. Print a report analyzing your findings. The report should state the type of sort/search, the number of elements used and a comparison of the sorts used. The results should be sorted from fastest to slowest. An example of the overall output system can be like this. Choose your tester type: 1) 2) -> 2 Sorting Searching Please enter the size of the list -> 100 Randomly producing your list ........... Please enter the value to be searched for -> 55 Generating Report: Linear Search algorithm took 0.12516S to search the value you provided. Binary Search algorithm took 0.00341S to search the value your provided Jump Search algorithm took 0.02541S to search the value you provided
Step by Step Solution
There are 3 Steps involved in it
Step: 1
To add the functionality for timing and generating a report for the sorting and searching algorithms you can use the time module in Python Heres an ex...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started