"O(log n)" is a notation used in computer science to describe the efficiency of an algorithm. It indicates that as the size of the input data, represented by "n," increases, the time it takes to complete the algorithm grows logarithmically. This means that even if the input size doubles, the time taken increases by a much smaller amount, making it very efficient for large datasets.
A common example of an algorithm with O(log n) complexity is binary search. In binary search, the algorithm repeatedly divides a sorted list in half to find a target value, significantly reducing the number of comparisons needed compared to a linear search.