## Number of elements less than or equal to a given number in a given subarray | Set 2 (Including Updates)

Given an array ‘a[]’ and number of queries q there will be two type of queries Query 0 update(i, v) : Two integers i and… Read More »

- Design a Chess Game
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Kth smallest element in a subarray
- Lazy Propagation in Segment Tree | Set 2
- 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
- Trie Data Structure using smart pointer and OOP in C++
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Longest string in an array which matches with prefix of the given string
- Implement a Dictionary using Trie
- Persistent Trie | Set 1 (Introduction)
- Count of strings whose prefix match with the given string to a given length k
- Sort an array of strings based on the frequency of good words in them
- Introduction to R-tree
- Queries to update a given index and find gcd in range
- Flipping Sign Problem | Lazy Propagation Segment Tree
- 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
- Gap Buffer Data Structure
- Count smaller elements on right side and greater elements on left side using Binary Index Tree
- Find a pair from the given array with maximum nCr value
- Bottom-up traversal of a Trie
- 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
- Search in a trie Recursively
- Insertion in a Trie recursively
- B*-Trees implementation in C++
- Proto Van Emde Boas Tree | Set 2 | Construction

Given an array ‘a[]’ and number of queries q there will be two type of queries Query 0 update(i, v) : Two integers i and… Read More »

We have an array arr[0 . . . n-1]. There are two type of queries Find the XOR of elements from index l to r… Read More »

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 »