Static Range Minimum Query
Medium
Sparse Table & RMQ
Given an array that never changes, answer q queries asking for the minimum of nums[l..r] (0-indexed, inclusive). Use a sparse table for O(1) per query.
Constraints
1 <= n, q <= 10^5
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.