1. Algorithm Description: Binary Search is an efficient algorithm used to search for a target value in a sorted array. It works by dividing the search interval in half and comparing the target with the middle element of the array.
2. Steps of Binary Search:
3. Time Complexity: O(log n) as the search space is halved with each iteration.
4. Space Complexity: O(1) for the iterative version, as it only requires a few extra variables.
5. Stability: Binary Search is not concerned with stability as it's not a sorting algorithm.
6. Usage: Binary Search is commonly used in scenarios where the data is already sorted, such as searching in dictionaries, databases, or other sorted structures.