## Self-Balancing-Binary-Search-Trees (Comparisons)

Self-Balancing Binary Search Trees are height-balanced binary search trees that automatically keeps height as small as possible when insertion and deletion operations are performed on… Read More »

- Design a Chess Game
- Kth smallest element in a subarray
- Rearrange numbers in an array such that no two adjacent numbers are same
- Implement a Dictionary using Trie
- Trie Data Structure using smart pointer and OOP in C++
- Lazy Propagation in Segment Tree | Set 2
- Range Queries to Find number of sub-arrays with a given xor
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Persistent Trie | Set 1 (Introduction)
- Longest string in an array which matches with prefix of the given string
- Sort an array of strings based on the frequency of good words in them
- Count of strings whose prefix match with the given string to a given length k
- Count smaller elements on right side and greater elements on left side using Binary Index Tree
- Introduction to R-tree
- Queries for number of distinct elements in a subarray | Set 2
- Queries to update a given index and find gcd in range
- Flipping Sign Problem | Lazy Propagation Segment Tree
- Gap Buffer Data Structure
- Find triplet such that number of nodes connecting these triplets is maximum
- Search in a trie Recursively
- Bottom-up traversal of a Trie
- Find the number of different numbers in the array after applying the given operation q times
- Extendible Hashing (Dynamic approach to DBMS)
- String Range Queries to find the number of subsets equal to a given String
- B-Tree Insert without aggressive splitting
- Insertion in a Trie recursively
- Strings from an array which are not prefix of any other string
- Van Emde Boas Tree | Set 1 | Basics and Construction
- 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

Self-Balancing Binary Search Trees are height-balanced binary search trees that automatically keeps height as small as possible when insertion and deletion operations are performed on… Read More »

Given a binary tree, the task is to find the distance between two keys in a binary tree, no parent pointers are given. Distance between… Read More »

Inverted Index It is a data structure that stores mapping from words to documents or set of documents i.e. directs you from word to document.… Read More »

Euler tour of tree has been already discussed which flattens the hierarchical structure of tree into array which contains exactly 2*N-1 values. In this post,… Read More »

Given a binary tree, the task is to find the distance between two keys in a binary tree, no parent pointers are given. The distance… Read More »

A Levelwise GCD/LCM alternating segment tree is a segment tree, such that at every level the operations GCD and LCM alternate. In other words at… Read More »

Given a binary tree where each node can have at most two child nodes, the task is to find the Euler tour of the binary… Read More »

Given an array arr[0 . . . n-1]. Find the maximum of elements from index l to r where 0 <= l <= r <=… Read More »

Prerequisite :Basic knowledge of STL and Sets Data structure. About ordered set Ordered set is a policy based data structure in g++ that keeps the… Read More »

Given N numbers and Q queries, each query consists of L and R. Task is to write a program which prints the count of numbers… Read More »

Given a rectangular matrix M[0…n-1][0…m-1], and queries are asked to find the sum / minimum / maximum on some sub-rectangles M[a…b][e…f], as well as queries… Read More »

Euler tour tree (ETT) is a method for representing a rooted tree as a number sequence. When traversing the tree using Depth for search(DFS), insert… Read More »

Given N pieces of chessboard all being ‘white’ and a number of queries Q. There are two types of queries : Update : Given indices… Read More »

Given an array of numbers of size N and Q queries. Each query or a range can be represented by L (LeftIndex) and R(RightIndex). Find… Read More »

Given an array of N integers, the task is to perform the following two queries: query(start, end) : Print the number of prime numbers in… Read More »