bubble sort
in this bubble sort why we need 2 loops?
and we used
instead of
3 Replies
⌛
This post has been reserved for your question.
Hey @Manish Kumar! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Try to visualize how the bubble sort works.
The idea is to run through the array, making small values bubble up to the start of the array.
And to repeat doing that until the array is sorted
So you:
- repeat
-- running through the array
That's a loop of a loop
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.