Consider the modified binary search algorithm so that it splits the input not into two sets of almost-equal sizes, but into three sets of sizes approximately one-third. Give the pseudo-code description of this ternary search algorithm and find its asymptotic complexity using a recursion tree.
Solution:




NOTE:
If you are satisfied with my answer please do upvote and if you
have any kind of doubts please post in the comment section. I'll
surely help you there.
Thank You:)
Consider the modified binary search algorithm so that it splits the input not into two sets...