I have started watching your videos recently. You teach step by step and in an orderly manner. From this point of view, I can say that if you continue, you have potential to convert this channel in the top list of the youtube channels for learning CS concepts. Best of luck!
its n ^ 2, in optimised buble, if you maintain a extra flag to check if swaps are made after initial iteration and it is equal to 0 you stop the algo to achieve O(n2)
Hi all,
If you have any doubt or query, feel free to write a comment ✍️ to clarify it.
I have started watching your videos recently. You teach step by step and in an orderly manner. From this point of view, I can say that if you continue, you have potential to convert this channel in the top list of the youtube channels for learning CS concepts. Best of luck!
The best case time complexity will be O(n), it is when the list is already sorted.
It is actually O(n^2) because it is a nested loop regardless of a swap.
its n ^ 2, in optimised buble, if you maintain a extra flag to check if swaps are made after initial iteration and it is equal to 0 you stop the algo to achieve O(n2)
underated channel. great videos as usual! keep up the good work
great explanation
Keep doing these amazing videos🤗
I was so confused about why the n was divided by 2 now i get it
Thanks A LOT!! I thought that the best case time complexity is O(n)
Thank you mam
tysm
Best. Keep going :)
Mam in optimised code worst case , n=5 total comparisons=10 can we consider (2n ) is the worst case for that.. bcoz 2n =2(5)=10
The best case running time of bubble sort
O(n) or 0(n^2)
This question given in previous examination
I am so confused
I think j
Yeah, That I have shown in the optimized code at 4.44, watch it fully.
O(n)🙃