Question: What is the average time complexity of searching for an element in a sorted array using binary search?
Options:
Correct Answer: O(log n)
Solution:
Binary search divides the array in half each time, leading to a time complexity of O(log n) for searching.