recategorized by
421 views

1 Answer

Best answer
1 votes
1 votes

Worst case time to search an element in  balanced BST with n element =log2n

Here we have (2n)! element So time complexity will be=log2 (2n)!

                                                                                     =log22n2n

                                                                                     =2n log22n

                                                                                     =2n(log22 +log2n)

                                                                                     =2nlog2n

                                                                                                                 = O(nlogn)

selected by

Related questions