sir, can you please present a Stack memory diagram of different stages while stack is building and falling for both Array sorted and First Index problems so that we can understand this even better.
Stack memory diagram for Array sorted and First Index
Try yourself it is very easy.
If you make a mistake i will help you
send me screenshot
I will correct