Quiz Complete, well Done!
How does linear search process an unsorted list?
In a linear search, the worst-case scenario occurs when the target item is **
** or not in the list.
O(n)
What is the difference between linear search and binary search?
Boolean
In which scenario would linear search be a better choice than binary search?
What is the space complexity of linear search?
Which of the following is an example of when linear search might be used?
Index
In a linear search, the average time complexity is **
** of O(n), where n is the number of items in the list.
Best-case scenario
In which type of data does linear search perform best?
In a linear search, the items are checked **
** until the target item is found.
What is the worst-case time complexity of linear search?
Element
List
What is the worst-case time complexity of linear search?
Linear search can be easily implemented using a **
** loop to iterate through the items in the list.
What is the time complexity of linear search?
What is the drawback of linear search compared to binary search?