Quiz Complete, well Done!
What is the time complexity of linear search?
What is linear search also commonly known as?
Efficiency
Linear search checks every item in the list and has a worst-case **
** of O(n).
When is linear search preferred over binary search?
Unordered
Which of the following is an advantage of linear search?
What is the space complexity of linear search?
In which data structure is linear search most commonly used?
What is the drawback of linear search compared to binary search?
Array
Big O notation
|
|
|
|
|
|
|
|
|
|
What is the best-case time complexity of linear search?
List
A linear search algorithm is an algorithm that looks at every
in a list or an array until it finds the target value.
In a linear search, the worst-case scenario occurs when the target item is **
** or not in the list.
What is the main advantage of linear search?
What is the purpose of the return statement in a linear search function?
In a linear search, if the target item is not found, the algorithm **
** through every item in the list before stopping.