Explore what CodeHS has to offer for districts, schools, and teachers.
Click on one of our programs below to get started coding in the sandbox!
View All
Which of the following statements about linear and binary searches is NOT true?
Binary searches are always more efficient than linear searches.
A binary search requires data to be sorted, while a linear search does not.
The code required for a linear search is simpler compared to a binary search
As data sets get larger, in general, the difference in performance between binary and linear searches gets larger.
There is not much difference in performance between a binary and linear search for small data sets (i.e. less than 10)