ICS 140 Computational Thinking with Programming
Class Exercise 11
What is the name of the search algorithm that loops over every item in the list to check if it contains the sought item?
The binary search method is faster than searching all items but has an additional constraint. What is required of a list to use binary search?
What does big O notation represent?
Describe the Selection Sort algorithm.
Describe the Insertion Sort algorithm.
Describe the Bubble Sort algorithm.
Describe the Merge Sort algorithm.
For the sort algorithms above, which one will generally be the most efficient as lists grown larger?
In addition to the increase in processing required as list grow, name another resource constraint to watch for.
Coding sorting algorithms requires a way to swap values between 2 places in a list. Choose one of the methods that can be used and write the python code for swapping values below.
Coding Search Algorithms
Write python function that implements the sequential and binary search algorithms. Use the provided search_algorithms.py file provided to complete this exercise. In the search_algorithms.py file, you will find some functions already built that will help test out the performance of the algorithms. I have also copied the pseudocode from the assigned reading to help simplify the coding process. Write functions with the names and inputs of the routines in the commented pseudocode.
Note: Some lines of the pseudocode are not relevant to python. For example, there is no end if statement like there is in other programming languages. Lines like this can be deleted or commented out.
The output should like something
Smaller lists will be very close in speed. If we test out a larger number, we should see the binary search pull away with dramatically.
Once you have coded the functions, paste the code for the 2 functions in their designated area below and take a few screenshots of your program running with different sizes of lists similar to the screenshots above.
QUALITY: 100% ORIGINAL – NO PLAGIARISM
(USA, AUS, UK & CA PhD. Writers)
CLICK HERE TO GET A PROFESSIONAL WRITER TO WORK ON THIS PAPER AND OTHER SIMILAR PAPERS
About Our Service
We are an online academic writing company that connects talented freelance writers with students in need of their services. Unlike other writing companies, our team is made up of native English speakers from countries such as the USA, UK, Canada, Australia, Ireland, and New Zealand.
- At ClassicWritersBay.com, most of our writers are degree-holding native speakers of English who are familiar with various writing styles. Our writers are proficient in many fields, including Economics, Business, Accounting, Finance, Medicine, Chemistry, Literature, Mathematics, Statistics, and many others.
- Making our customers happy is an important part of our service. So do not be surprised if you get your paper well before the deadline!
- We pay a lot of attention to ensuring that you get excellent customer service. You can contact our Customer Support Representatives 24/7. When you order from us, you can even track the progress of your paper as it is being written!
- We are attentive to the needs of our customers. Therefore, we follow all your instructions carefully so that you can get the best paper possible.
- It matters to us who writes for you, and we are serious about selecting the best candidates.
- Our writers are always learning something new, so they are familiar with the latest developments in the scientific world and can write papers with updated information and the latest findings.
- Quality original papers that follow your instructions carefully.
- On time delivery – you get the paper before the specified deadline.
- Attentive Customer Support Representatives available 24/7.
- Complete confidentiality – we do not share you details or papers with anybody else.