Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
2 votes
1 answer
73 views

I need a function that takes as an argument pointer to sorted array and returns pointer to a balanced BST. My assumption is that for each node all nodes in left subtree are smaller and all nodes in ...
yoan's user avatar
  • 45
0 votes
0 answers
82 views

I'm trying to understand how an AVL tree is built from a sequence of integer keys. The keys I have are: 10, 20, 5, 4, 3, 2, 30, 40 I want to construct the AVL tree step by step and see how rotations ...
shakir Sumon's user avatar
0 votes
1 answer
105 views

Does anyone know how to perform the right left rotation on this avl tree? I moved 45 up to be the root, the 50 to be the right child, and the 40 to be the left child but where do the children of 45 ...
Haroon Almadani's user avatar
0 votes
1 answer
60 views

I am looking at this challenge: How many binary search trees can be made with 36 nodes such that the difference between the depths of the leaves is at most one? Can I say that it also means that How ...
user avatar
2 votes
3 answers
1k views

Let's say I delete the root node (6), how do I rebalance the tree? Is rebalancing the tree related to a left or right rotation? Would it be different depending on AVL vs Red/Black?
Alexander Mills's user avatar