Quiz Complete, well Done!
In which data structure is linear search most commonly used?
What is the main disadvantage of linear search?
What is the space complexity of linear search?
Which of the following is a drawback of linear search?
Search
Index
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 purpose of the return statement in a linear search function?
Linear search is a **
** searching algorithm that works best on unsorted collections of data.
Sequential Search
Worst-case scenario
What is the time complexity of linear search?
What is the worst-case time complexity of linear search?
Runtime
In a linear search, the worst-case scenario occurs when the target item is **
** or not in the list.
What is the worst-case time complexity of linear search?
O(n)
Linear search is also called **
** search because it checks the items one by one.
What is the space complexity of linear search?
In which type of data does linear search perform best?