Ternary Search
Learn Ternary Search (Searching, Data Structures & Algorithms) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Finding the Peak of a Unimodal Function Ternary search finds the MAXIMUM (or minimum) of a UNIMODAL function - one that strictly increases then strictly decreases (or vice versa) - by comparing two midpoints per step and discarding a THIRD of the search space. Not for finding a specific VALUE (that's binary search's job) - this is for finding an EXTREME POINT.