# Category Archives: Advanced Data Structure

## Sort numbers stored on different machinesSeptember 26, 2012

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.

## Find the k most frequent words from a file

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.

## XOR Linked List – A Memory Efficient Doubly Linked List | Set 2June 14, 2012

In the previous post, we discussed how a Doubly Linked can be created using only one space for address field with every node.

## AVL Tree | Set 2 (Deletion)March 11, 2012

We have discussed AVL insertion in the previous post. In this post, we will follow a similar approach for deletion.

## AVL Tree | Set 1 (Insertion)February 23, 2012

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.

## Trie | (Delete)November 30, 2011

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 | (Insert and Search)October 5, 2011

Trie is an efficient information retrieval data structure. Using trie, search complexities can be brought to optimal limit (key length).

## Decision Trees – Fake (Counterfeit) Coin Puzzle (12 Coin Puzzle)July 30, 2011

Let us solve the classic “fake coin” puzzle using decision trees.

## Spaghetti StackJune 29, 2011

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)

## XOR Linked List – A Memory Efficient Doubly Linked List | Set 1May 23, 2011

An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes.

## Tournament Tree (Winner Tree) and Binary HeapMarch 23, 2011

Given a team of N players. How many minimum games are required to find second best player?