Question: What is the main advantage of binary search over linear search?
Options:
Correct Answer: It has a better time complexity
Solution:
Binary search has a time complexity of O(log n), which is significantly better than the O(n) of linear search.