Quiz Complete, well Done!
In which situation is linear search usually the most efficient?
In a linear search, if the target item is not found, the algorithm **
** through every item in the list before stopping.
Linear search checks every item in the list and has a worst-case **
** of O(n).
What is the main disadvantage of linear search?
In a linear search, the average time complexity is **
** of O(n), where n is the number of items in the list.
In which data structure is linear search most commonly used?
Linear search can be used on a **
** collection of data and works best when the items are not sorted.
Sequential Search
How does linear search process an unsorted list?
What is linear search also commonly known as?
In which scenario would linear search be a better choice than binary search?
Array
The linear search algorithm starts at the **
** of the list and checks each item in turn until the target item is found.
A linear search algorithm is an algorithm that looks at every
in a list or an array until it finds the target value.
What is the difference between linear search and binary search?
Average-case scenario
Unordered
|
|
|
|
|
|
|
|
|
|
List
Search