i was reading the binary search and ternary search algorithms. But i had a doubt with recurrence relation of ternary search as somewhere it is T(n/3)+c and T(2*n/3)+c. I want to know which one is correct as solution for both is same.
i have referred a and b and both are different. Which one is True and HOW???
Also the number of comparison in binary search is logn+1,So what is the number of comparisons in Ternary search and how?please elaborate it