Colors: Blue = Left, Purple = Right, Orange = Mid1, Pink = Mid2, Green = Found, Red = Excluded
Ternary Search is a searching algorithm that works on sorted arrays by dividing the search space into three equal parts instead of two.
How it works:
Time Complexity: O(log₃ n) - theoretically faster than binary search but more comparisons