Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 35s1 days 16 hours 1 minutes 35 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 35s1 days 16 hours 1 minutes 35 seconds.

Sign in to watch this lesson
Advanced - Arrays, Sorting and Searching · 3:52
Ternary search finds the peak of a strictly unimodal function by comparing two probes and dropping a third of the interval each step. We run it on a parabola, use fixed iteration counts instead of epsilon loops, handle integer arguments, switch to golden-section search to reuse one probe per step, and watch a plateau break the method.