Ternary Search Vs Binary Search
Learn about ternary search
Is Binary search better than ternary search?
As everyone know Binary is 2 and ternary is 3. So here, Binary search is used to divide the array into half recursively and find the efficient element. What if we do the same with ternary search and split the array into thrice. The ternary search should be efficient than binary search right? Let’s see which is efficient in below post.
Time Complexity of both algorithms
Binary search -> O(n)
This post is licensed under CC BY 4.0 by the author.