Quiz Complete, well Done!
Big O notation
In a linear search, the items are checked **
** until the target item is found.
Algorithm
In which type of data does linear search perform best?
In a linear search, if the target item is not found, the algorithm **
** through every item in the list before stopping.
Efficiency
When is linear search preferred over binary search?
Boolean
Which of the following is a drawback of linear search?
List
What is the time complexity of linear search when searching for the last element of an array?
Complexity
Worst-case scenario
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 a **
** searching algorithm that works best on unsorted collections of data.
Linear search can be used on a **
** collection of data and works best when the items are not sorted.
In a linear search, the worst-case scenario occurs when the target item is **
** or not in the list.
What is the best-case time complexity of linear search?
O(n)