Given an integer array and a list of range queries [l, r], return the minimum element in each range (inclusive), using a segment tree (or sparse table). Return the answers as an array in order. The input is JSON {nums, queries}.
Input: JSON {nums, queries}.
Output: Array — the minimum for each query.
Input: {"nums":[5,2,8,1,9,3],"queries":[[0,2],[1,4],[3,5]]}
Output: [2,1,1]
Explanation: Range minimums.Input: {"nums":[7],"queries":[[0,0]]}
Output: [7]
Explanation: Single element.Input: {"nums":[3,1,4,1,5],"queries":[[0,4],[2,3]]}
Output: [1,1]
Explanation: Two ranges.1<=n<=10^51<=queries<=10^50<=l<=r<n