Best case for given algorithm will be also O(n2). Becoz everytime inside j loop "if" condition will check n time. But you can optimise it by placing a variable (swapped = false;) in j loop. And when swapping is done than change it to (swapping = True) inside the swapping condition. After j loop terminates than again check if (swapping== false) than simply break .
Thankyou sir for putting in your efforts and making us understand.
you are just the best
thnku
plz subscribe my channel
Wow nice 👍👍
Thank you sir
Very well explained! Thank you! I just wanted to know can we make notes and take screenshots? Btw I already did
Notes h kyaa aapke pass
Please 🙏 reply
Helpful video
Thank you sir!
Thank you sir from Pakistan
Very Good sir
great sir
Sir what's app group full btara hai plzz🙏🙏🙏 kese kre btao
Very Nice. Thank you sir.
Thank you sir
Sir best case me n kaise aayega . statement run to hoga and conditions false hoga
There are no swapping will happen
@@UniversityAcademy swapping is constant, how can you say
Kya ye DSUC part 55 ke baad ka part hai?
Please upload unit 2
Very soon
pass no kitna hoga kaisa samajte he?
How is the best case O(n)? The swap function will not work, but the inner loop will(values of j will change)
Best case for given algorithm will be also O(n2). Becoz everytime inside j loop "if" condition will check n time.
But you can optimise it by placing a variable (swapped = false;) in j loop. And when swapping is done than change it to (swapping = True) inside the swapping condition.
After j loop terminates than again check if (swapping== false) than simply break .
Bhai in videos ko dekh ke aktu ho jayega na?
Sir how many videos are left to upload?
7-8 Aprox
@@UniversityAcademy sir can they be uploaded till 10th? Semester exams shuru ho rhe hain
Thanks sir