Ternary Search Algorithm

algorithm
search-algorithm
ternary-search

(Team) #1
Ternary search algorithm is a divide-and-conquer search algorithm. It is mandatory for the array (in which you will search for an element) to be sorted before we begin the search. In this search, after each iteration it neglects ⅓ part of the array and repeats the same operations on the remaining ⅔.

The average case time complexity is O(log N) and the auxiliary space complexity is O(1).

Refer the article for more details and implementations.

Share your thoughts or ask any questions below.
This is a companion discussion topic for the original entry at http://iq.opengenus.org/ternary-search-algorithm/