Doubt in understanding the question only

In this problem its given,
Input: nums = [-2,5,-1], lower = -2, upper = 2,
Output: 3
Explanation: The three ranges are : [0,0], [2,2], [0,2] and their respective sums are: -2, -1, 2.
how the respective sums are coming -2 -1 and 2
and how are the ranges selected??

See this


[0,0] [2,2] & [0,2] are the indexes in which all elements sum lies in range between lower and upper.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.