Quiz Complete, well Done!
Complexity
What is the worst-case time complexity of linear search?
Comparison
Algorithm
What is the space complexity of linear search?
Worst-case scenario
Linear time complexity
In a linear search, if the target item is not found, the algorithm **
** through every item in the list before stopping.
Boolean
O(n)
In a linear search, the worst-case scenario occurs when the target item is **
** or not in the list.
In a linear search, the items are checked **
** until the target item is found.
What is the worst-case time complexity of linear search?
A linear search algorithm is an algorithm that looks at every
in a list or an array until it finds the target value.
Linear search is also called **
** search because it checks the items one by one.
In which scenario would linear search be a better choice than binary search?
The linear search algorithm starts at the **
** of the list and checks each item in turn until the target item is found.
What is linear search also commonly known as?
What is the best-case time complexity of linear search?
Sequential Search