Given N machines. Each machine contains some numbers in sorted form. But the amount of numbers, each machine has is not fixed. Output the numbers from all the machine in sorted non-decreasing form.
Given a book of words. Assume you have enough main memory to accommodate all words. design a data structure to find top K maximum occurring words. The data structure should be dynamic so that new words can be added.
In the previous post, we discussed how a Doubly Linked can be created using only one space for address field with every node.
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?