## Merge Sort Tree (Smaller or equal elements in given row range)

Given an array where each element is a vector containing integers in sorted order. The task is to answer following queries: count(start, end, k) :… Read More »

- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Count of words that are present in all the given sentences
- Design a Chess Game
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Count of strings whose prefix match with the given string to a given length k
- Lazy Propagation in Segment Tree | Set 2
- Longest string in an array which matches with prefix of the given string
- Persistent Trie | Set 1 (Introduction)
- Rearrange numbers in an array such that no two adjacent numbers are same
- Range Queries to Find number of sub-arrays with a given xor
- Program to implement Run Length Encoding using Linked Lists
- Introduction to R-tree
- Sort an array of strings based on the frequency of good words in them
- Queries to update a given index and find gcd in range
- Find triplet such that number of nodes connecting these triplets is maximum
- Find the number of different numbers in the array after applying the given operation q times
- Find a pair from the given array with maximum nCr value
- Flipping Sign Problem | Lazy Propagation Segment Tree
- B-Tree Insert without aggressive splitting
- Arrange array elements such that last digit of an element is equal to first digit of the next element
- Index of kth set bit in a binary array with update queries
- Strings from an array which are not prefix of any other string
- Gap Buffer Data Structure
- Check if the given Trie contains words starting from every alphabet
- Implement a Dictionary using Trie
- Insertion in a Trie recursively

Given an array where each element is a vector containing integers in sorted order. The task is to answer following queries: count(start, end, k) :… Read More »

It is recommended to refer following post as prerequisite of this post. Splay Tree | Set 1 (Search) Following are the different cases to delete… Read More »

Quadtrees are trees used to efficiently store data of points on a two-dimensional space. In this tree, each node has at most four children. We… Read More »

Given an array ‘a[]’ and number of queries q. Each query can be represented by l, r, x. Your task is to print the number… Read More »

We are given a Trie with a set of strings stored in it. Now the user types in a prefix of his search query, we… Read More »

Dynamic connectivity is a data structure that dynamically maintains the information about thee connected components of graph. In simple words suppose there is a graph… Read More »

We are given 2*N – 1 integers. We need to check whether it is possible to construct a Range Minimum Query segment tree for an… Read More »

One of the most common operations on strings is appending or concatenation. Appending to the end of a string when the string is stored in… Read More »

An n-ary tree in computer science is a collection of nodes normally represented hierarchically in the following fashion. The tree starts at the root node.… Read More »

We are given an array of integers and a range, we need to find whether the subarray which falls in this range has values in… Read More »

Given a string of lower alphabetic characters, find K-th character in a string formed by substrings (of given string) when concatenated in sorted form. Examples:… Read More »

Given a string which contains lower alphabetic characters, we need to find out such a substring of this string whose product of length and frequency… Read More »

BK Tree or Burkhard Keller Tree is a data structure that is used to perform spell check based on Edit Distance (Levenshtein distance) concept. BK… Read More »

We encounter various problems like Maximum length palindrome in a string, number of palindromic substrings and many more interesting problems on palindromic substrings . Mostly… Read More »

Given a dictionary find out if given word can be made by two words in the dictionary. Note: Words in the dictionary must be unique… Read More »