Tag: Priority Queue

Huffman Coding Compression Algorithm

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.  

External Merge Sort Algorithm

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).

Sort a K-Sorted Array

Given a k-sorted array that is almost sorted such that each of the N elements may be misplaced by no more than k positions from the correct sorted order. Find a space-and-time efficient algorithm to sort the array.