Regaridng the bubble sort

why u have started itr with 1 in all other examples u start I with 0 . so wts the reason .

Hey @ssmit_joshi :grinning:,
It’s not compulsory to start I with 1 , you can even start your for loop from 0. The reason why in video I started from 1 is to reduce only one iteration I.e., O(1) which can be ignored easily. Hope this helped you understanding :grinning:

Still if you have problem in understanding, you can have a look at my code here : https://ide.codingblocks.com/s/330275

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.

why here it is done n-1-itr i dont understand and if any other method is there then also provide