Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is binary search?
Remember it reduces the search area significantly.
What time complexity does linear search have?
Think about the number of elements to check.
What is the time complexity of binary search?
Think about how many elements you eliminate each time.
True or False: Binary search can be applied to unsorted arrays.
Consider how the elements need to be ordered.
Design an algorithm in pseudocode for binary search and analyze its time complexity.
Ensure to consider how to handle the mid index calculation.
Explain a scenario in a real-world system where binary search would be preferred over linear search, justifying your reasoning.
Think about the magnitude of data and sorting.
3 more questions in this section. Enroll free to practise them all.
Enroll free