73.3k views
3 votes
Given a sorted list of 1024 elements, what is the runtime for binary search if the search key is less than all elements in the list?

User Stirman
by
4.4k points

1 Answer

3 votes

Answer: 1024

Linear search's runtime is proportional to the number of list elements.

User Daron
by
3.9k points