Computer scienceAlgorithms and Data StructuresAlgorithmsArray algorithmsSearch algorithms

Searching problem

Clarifying the theory

Report a typo

Some learners get confused by the expression that one algorithm is always faster than another one. For instance, in this topic, you have read the following phrase: "Interval search is always faster and more efficient than sequential search". This doesn't mean that interval search algorithms work faster on every single set of data that you can think of. This simply means that such algorithms have better time complexity in terms of Big O (get back to the respective topic if needed) than the ones we compare them to.

Let's illustrate this with some simple examples: select all the datasets in which sequential search (from left to right) algorithms perform not more steps than interval search algorithms while searching for number 77. This way, you can make sure yourself that the explanation above makes sense.

Select one or more options from the list
___

Create a free account to access the full topic