Goal: Find the Peak Element
SYSTEM READY
while (high - low > 2) { let m1 = low + Math.floor((high - low) / 3); let m2 = high - Math.floor((high - low) / 3); if (arr[m1] < arr[m2]) low = m1; // Peak is to right of m1 else high = m2; // Peak is to left of m2 } return max(arr[low], arr[mid], arr[high]);