Search Algorithms - Categories

Drag answers into the correct category. Once all of the answers have been categorised press submit to check your answers.

Linear Search
Binary Search

Answers
Time complexity is O(log n) where n is the number of elements in the list
Best suited for small or unsorted datasets
Does not require the list to be sorted
More efficient than linear search for large datasets but requires sorting
Divides the search interval in half repeatedly
Best suited for large, sorted datasets
Requires the list to be sorted before the search begins
Simple to implement and understand
Time complexity is O(n) where n is the number of elements in the list
Checks each element in the list sequentially
Log in or sign-up to access the categorising activity



Don't have a login?

You can still revise this topic