1 1 vote An array of $n$ elements is sorted. We want to search for an element using Binary Search. If we modified the algorithm to split the array into three equal parts instead of two (Ternary Search), what would be the recurrence relation for the time complexity?$T(n)=T(n / 3)+O(n)$ $T(n)=T(n / 3)+O(1)$ $T(n)=T(2 n / 3)+O(1)$ $T(n)=3 T(n / 3)+O(1)$ Programming in Python goclasses python-&-dsa goclasses-da-dpp goclasses-da-dpp-day-107 goclasses-python-&-dsa-practice-questions + – GO Classes 174 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
0 0 votes After two comparisons to determine which third the element is in, the search space is reduced to $n / 3$, with constant work per step. GO Classes answered Feb 24 GO Classes comment Share Follow 0 reply Please log in or register to add a comment.