Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is the time complexity of linear search?
Think about how many elements you might have to check.
Can binary search be applied to unsorted arrays?
Recall the precondition for binary search.
What is the time complexity of a linear search algorithm?
Think about worst-case scenarios in the search process.
True or False: Binary search can be performed on an unsorted array.
Review the requirements for employing binary search.
Consider an array of size n. You implement linear search, and then you change the array to be sorted. How would you expect the average search time to change, and why?
Compare efficiency based on array structure.
If the input size doubles, how does that impact the time complexity for linear versus binary search?
Chart how inputs affect search times differently.
5 more questions in this section. Enroll free to practise them all.
Enroll free