Binary Search Comparison

This visualization compares two binary search approaches for finding the first and last occurrence of a target value in a sorted array:

Left Search: Finds the first occurrence by continuing to search left after finding a match.

Right Search: Finds the last occurrence by continuing to search right after finding a match.

Target value: 8 | Array: [5, 7, 7, 8, 8, 8, 10]