Problem in line 12

in line 12 shouldn’t it be j+1 ==p.size because j become 3 after running the code and j<p.size in the for loop, so how does it work explain.

@Souradeep-Kundu-824545687968212,
Are you sure you know how for loops work?
j<p.size() means the loop will iterate till this condition is true, so what would be the breaking condition of the loop(other than the explicit break condition within the for loop), j==p.size() isn’t it?

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.