• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
August 22, 2024 |7.8K Views

Segment Tree | Set 2 (Range Minimum Query)

Description
Discussion

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 where Segment Tree can be used. The following is the problem statement:
We have an array arr[0 . . . n-1]. We should be able to efficiently find the minimum value from index qs (query start) to qe (query end) where 0 <= qs <= qe <= n-1. 
 

Segment Tree _ Set 2 (Range Minimum Query): https://www.geeksforgeeks.org/segment-tree-set-1-range-minimum-query/