Skip to content

Tag Archives: Segment-Tree

We strongly recommend to refer below post as a prerequisite of this.Heavy Light Decomposition | Set 1 (Introduction)In the above post, we discussed the Heavy-light… Read More
Heavy Light decomposition (HLD) is one of the most used techniques in competitive programming. Example Problem: Let us understand Heavy-light decomposition (HLD) with the help… Read More
  In this post, we will discuss Important top 10 algorithms and data structures for competitive coding. Topics :  Graph algorithms Dynamic programming Searching and… Read More
The article describes an approach to solving the problem of finding the LCA of two nodes in a tree by reducing it to an RMQ… Read More
We have an array arr[0 . . . n-1]. We should be able to efficiently find the minimum value from index L (query start) to… Read More
Segment tree is introduced in previous post with an example of range sum problem. We have used the same “Sum of given Range” problem to… Read More
Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity,… Read More
We have introduced segment tree with a simple example in the previous post. In this post, Range Minimum Query problem is discussed as another example… Read More
Let us consider the following problem to understand Segment Trees.We have an array arr[0 . . . n-1]. We should be able to  Find the… Read More

Start Your Coding Journey Now!