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.
Given a string, find first K non-repeating characters in it by doing only single traversal of it. For example, if the string is ABCDBAGHCHFAC and K = 3, output would be D G F
Implement Heap data structure in Java. Email Address We have already introduced heap data structure in previous post and covered heapify-up, push, heapify-down and pop operations. In this post, java implementation of Max Heap and Min heap is discussed.
External sorting is a term for a class of sorting algorithms that can handle massive amounts of data. External sorting is required when the data being sorted do not fit into the main memory of a computing device (usually RAM) and instead they must reside in the slower external memory (usually a hard drive).
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.
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.
Given an array and positive integer k, find K’th largest element in the array.
Implement heap data structure.