I have an assignment that wants me to write an ternary search algorithm and compute its time complexity afterwards. I was able to write an algorithm for it but I couldn\'t c
It is Θ(log3(N)). To check how to calculate complexity just check http://en.wikipedia.org/wiki/Big_O_notation
To read more about ternary search, just check the wikipedia page also: http://en.wikipedia.org/wiki/Ternary_search