## 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… Read More »

- Design a Chess Game
- Kth smallest element in a subarray
- Implement a Dictionary using Trie
- Rearrange numbers in an array such that no two adjacent numbers are same
- Trie Data Structure using smart pointer and OOP in C++
- Count smaller elements on right side and greater elements on left side using Binary Index Tree
- Sort an array of strings based on the frequency of good words in them
- Longest string in an array which matches with prefix of the given string
- Queries for number of distinct elements in a subarray | Set 2
- Flipping Sign Problem | Lazy Propagation Segment Tree
- Search in a trie Recursively
- Extendible Hashing (Dynamic approach to DBMS)
- Bottom-up traversal of a Trie
- Gap Buffer Data Structure
- Count inversions in an array | Set 4 ( Using Trie )
- String Range Queries to find the number of subsets equal to a given String
- B*-Trees implementation in C++
- Insertion in a Trie recursively
- Shortest cycle in an undirected unweighted graph
- Van Emde Boas Tree | Set 1 | Basics and Construction
- Strings from an array which are not prefix of any other string
- Maximise the number of toys that can be purchased with amount K using min Heap
- Number of triplets in array having subarray xor equal
- Proto Van Emde Boas Tree | Set 2 | Construction
- Van Emde Boas Tree | Set 2 | Insertion, Find, Minimum and Maximum Queries
- Check if the given Trie contains words starting from every alphabet
- Lexicographical ordering using Heap Sort
- Pairing Heap
- Range maximum query using Sparse Table
- Proto Van Emde Boas Tree | Set 3 | Insertion and isMember Query

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… Read More »

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

We have discussed AVL insertion in the previous post. In this post, we will follow a similar approach for deletion. Steps to follow for deletion.… Read More »

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… Read More »

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… Read More »

Trie is an efficient information reTrieval data structure. Using Trie, search complexities can be brought to optimal limit (key length). If we store keys in… Read More »

Let us solve the classic “fake coin” puzzle using decision trees. There are the two different variants of the puzzle given below. I am providing… Read More »

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) Spaghetti… Read More »

An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes. A memory efficient version of… Read More »

Given a team of N players. How many minimum games are required to find second best player? We can use adversary arguments based on tournament… Read More »