0 votes 0 votes Programming in C avl-tree data-structures time-complexity + – Arnabi asked Jan 28, 2017 Arnabi 745 views answer comment Share Follow See 1 comment See all 1 1 comment reply Manoj_Kumar commented Jan 29, 2017 reply Follow Share In this question nothing to do with AVL tree it just used to create some confution. Using sorted array we can make balance BST in O(n) taking each time median as root node. 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes It is also correct while constructing AVL tree you have to take care of balancing factor it should be between (-1,0,1) when BF(balancing factor) is aboe this you have to do rotation either (LL,LR,RR,RL) therfore time complexity will be O(n) Sandeep Suri answered Jan 29, 2017 Sandeep Suri comment Share Follow See all 0 reply Please log in or register to add a comment.