## Implementation of Treap Data Structure (Insert, Search and Delete)

In this post, we will implement Treap Data Structure and perform basic operations like insert, search and delete on it.

Coding made easy

In this post, we will implement Treap Data Structure and perform basic operations like insert, search and delete on it.

Given an array representing a Min Heap, convert Min Heap into a Max Heap. The conversion should be done inplace and in linear time.

Given M sorted lists of variable length, print them in sorted order efficiently.

Huffman Coding (also known as Huffman Encoding) is a algorithm for doing data compression and it forms the basic idea behind file compression. This post talks about fixed length and variable length encoding, uniquely decodable codes, prefix rules and construction of Huffman Tree.

A Treap Data Structure is basically a combination of a binary search tree and a heap. Binary Search Trees – Deletions and additions of nodes can make the tree unbalanced (heavier on sides, therefore, the property we value about BSTs, the ability to distribute data by equal divisions, goes out of whack). Therefore we …

Given a string, find first K non-repeating characters in it by doing only single traversal of it.

Implement Heap data structure in Java.

We can efficiently sort massive amounts of data using External Merge Sort Algorithm, when the data being sorted don’t fit into the main memory (which is usually RAM) and resides in the slower external memory (which is usually a hard disk).

Given M sorted lists each containing N elements, print them in sorted order efficiently.

Given M sorted lists of variable length, efficiently compute the smallest range that includes at-least one element from each list.

Given an array and positive integer k, find k’th smallest element in the array.