Sir I don't get dry run of subarrays

Plz try to make me understand

@rakesh800650 you need to generate subarrays, which means for each subarray, there will be a starting index and an ending index.
we can choose the starting index from 0 to n-1 and and similary the finishing index can be chosen from 0 to n-1
this can be done with the help of two nested loops.
for eg if n = 3
then in nested loops the values change like this
i j
0 0
0 1
0 2
1 0
1 1
1 2
2 0
2 1
2 2

now that we have starting and ending index, we can print all elements of that subarray with another loop.

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.