Question: What is the primary advantage of using binary search over linear search?
Options:
Correct Answer: Binary search has a time complexity of O(log n).
Solution:
Binary search has a time complexity of O(log n), making it significantly faster than linear search, which has a time complexity of O(n), especially for large datasets.