Identify the search technique:
It is useful when we need to search for an item in a small unsorted list, but it is slow and time-consuming when the list contains a large number of items. The time taken to search the list increases as the size of the list increases.
Identify the search technique:
It is useful when we need to search for an item in a small unsorted list, but it is slow and time-consuming when the list contains a large number of items. The time taken to search the list increases as the size of the list increases.
Solution
Linear search checks each item one by one from the start until the target is found or the list ends. It needs no sorting, so it suits small unsorted lists. In the worst case it compares every element, so the time grows in direct proportion to the list size, which is .
Binary search: needs a sorted list and halves the search range each time, so it stays fast even for large lists.
Hashing: finds an item directly from its key using a hash function, in about constant time on average, so the time does not grow with the list size.
Jump search: also needs a sorted list, and skips ahead in blocks of fixed size.
Related questions:
2026: 23 May Shift 1
2026: 11 May Shift 2
2025: 14 May Shift 1
2026: 23 May Shift 2
2026: 23 May Shift 2