Ternary Search Game — Unimodal Function Peak Challenge
Compare f(m1) vs. f(m2) on a live SVG unimodal curve to discard one-third of [lo, hi] each step in O(log n).
Time Complexity: O(log n)
Study the algorithm · Watch Visualizer · All Algorithm Games