Link Cut Trees (LCT) is a data structure that allows for efficient dynamic maintenance of trees. It is a type of self-adjusting data structure that… Read More
Category Archives: Advanced Data Structure
A Li Chao tree (also known as a Dynamic Convex Hull or Segment Tree with lazy propagations) is a data structure that allows for efficient… Read More
Given a 2D array arr[][] of size N * M, the value in arr[][] represents the value of coins, the task is to maximize the… Read More
Trie data structure is defined as a Tree based data structure that is used for storing some collection of strings and performing efficient search operations… Read More
Dynamic connectivity, in general, refers to the storage of the connectivity of the components of a graph, where the edges change between some or all… Read More
Given an N-ary tree consisting of N nodes with values from 1 to N rooted at 1, for all nodes, print the number of ancestors… Read More
Given an array A[ ] consisting of N distinct integers, the task is to find the number of elements which are strictly greater than all… Read More
Given an array A[ ] consisting of N distinct integers, the task is to find the number of elements which are strictly greater than all… Read More
Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More
Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More
Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More
Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More
In this article, we will see how to create a data structure that can handle multiple stacks with growable size. The data structure needs to… Read More
Given an array of integers, evaluate queries of the form LCM(l, r). There might be many queries, hence evaluate the queries efficiently.  LCM (l, r)… Read More
Given an array of integers, evaluate queries of the form LCM(l, r). There might be many queries, hence evaluate the queries efficiently.  LCM (l, r)… Read More