×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

range minimum query

A collection of 3 posts

Algorithms

Range Minimum query using segment tree [O(log N) update + O(log N) query]

In this article, we have solved the Range Minimum Query using Segment tree which takes O(log N) time for both update and range query. This is one of the best approaches to solve this problem.

Siddharth Agarwal Siddharth Agarwal
Algorithms

Range Minimum query using square root decomposition [O(1) update + O(sqrt N) query]

In this article at OpenGenus, we have solved the Range Minimum Query problem using Square Root Decomposition which takes constant time O(1) for update and O(square root of N) time for range query.

Siddharth Agarwal Siddharth Agarwal
Algorithms

Range Minimum query using Naive algorithm [O(1) update + O(N) query]

In the naive approach for range minimum query, we can execute the update query in constant time which is efficient and the best case but the query operation takes linear time O(N) which is slow depending upon number of elements and queries.

Siddharth Agarwal Siddharth Agarwal
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship