How does binary search work? What are its requirements?
Requires sorted array; repeatedly divides in half (O(log n)).
When to use Binary Search vs. Ternary Search?
Binary Search Ordered arrays or search spaces O(log n)
Ternary Search When function is unimodal (single peak) O(log n)