4.3.4 Searching algorithms Flashcards
1
Q
What time complexity is:
linear search
binary search
A
O(n)
O(log n)
2
Q
What is the maximum number of items accessed when searching for a particular item from a list using a binary search?
A
2^(n) > length of the list
n is the max number of items