0 votes 0 votes Consider we have an algorithm which generate preorder of any tree in Ο(log n) time, we have to create a Binary Search Tree with n distinct element. Which of the following will represents the worst case time complexity ? Ο(n) Ο(n log n) Ο(n2) Ο(1) DS data-structures binary-search-tree time-complexity made-easy-test-series + – Pankaj Joshi asked Jan 25, 2017 • recategorized Jul 6, 2022 by Lakshman Bhaiya Pankaj Joshi 450 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Ο(n^2) seems to be correct answer. because BST can be rght or left skewed in worst case. Vijay Thakur answered Jan 25, 2017 Vijay Thakur comment Share Follow See 1 comment See all 1 1 comment reply reena_kandari commented Jan 26, 2017 reply Follow Share http://www.geeksforgeeks.org/construct-bst-from-given-preorder-traversa/ 0 votes 0 votes Please log in or register to add a comment.