We have discussed AVL insertion in the previous post. In this post, we will follow a similar approach for deletion.
AVL tree is a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees cannot be more than one for all nodes.
In the previous post on trie we have described how to insert and search a node in trie. Here is an algorithm how to delete a node from trie.
Trie is an efficient information retrieval data structure. Using trie, search complexities can be brought to optimal limit (key length).
Let us solve the classic “fake coin” puzzle using decision trees.
Spaghetti stack A spaghetti stack is an N-ary tree data structure in which child nodes have pointers to the parent nodes (but not vice-versa)
An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes.
Given a team of N players. How many minimum games are required to find second best player?