Pair wise swaping n-itr-1

i didnt understand why we need just n-itr-1 iteration in j for loop

because with each itr, array is sorted at last,
that is
for itr=0, largest element is there at arr[n-1]
for itr=1,second largest element is there at arr[n-2]
and so on,
so we don’t need to go till end always!

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.