## Euler Tour | Subtree Sum using Segment Tree

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 »

- 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

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 »

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

Given a number N, and Q queries of two types 1 and 2. Task is to write a code for the given query where, in… Read More »

Prerequisites: Disjoint Set Data Structure Set Unordered_Map Disjoint Set data structure is used to keeps track of a set of elements partitioned into a number… Read More »

AA trees are the variation of the red-black trees, a form of binary search tree. AA trees use the concept of levels to aid in… Read More »

Given an array of N(always a power of 2) elements and Q queries. Every Query consists of two elements index and value.. We need to… Read More »

Given a bracket sequence or in other words a string S of length n, consisting of characters ‘(‘ and ‘)’. Find length of the maximum… Read More »

In QuickSort, ideal situation is when median is always chosen as pivot as this results in minimum time. In this article, Merge Sort Tree is… Read More »

Given an array of N numbers, the task is to answer Q queries of the following type:- query(start, end) = Number of times a number… Read More »

Given an array of n integers in non-decreasing order. Find the number of occurrences of the most frequent value within a given range. Examples: Input… Read More »

Given an array of n numbers, the task is to answer the following queries: maximumSubarraySum(start, end) : Find the maximum subarray sum in the range… Read More »

Sum Rule – If a task can be done in one of ways or one of ways, where none of the set of ways is… Read More »