Added: 3 years ago
From: kinkydarkbird
Views: 12,564
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (8)

Sign In or Sign Up now to post a comment!
  • jo tyż nie wia

  • co ja pacze

  • I thought bubble sort swept through the whole list each time...

  • @TheFerruccio - No. It sweeps through progressively 1 fewer entry each time. Cause the algorithm bubbles up the largest number to the final position, so we already know that final position is the largest, no need to check it again. On the next sweep, we can just ignore it. You can model it recursively.

  • @Theowne so v=t8g-iYGHpEA is incorrect?

  • Almost, but no. Your are checking one too much each iteration

  • You should have done a mini-freeze each time the moving part of the array changes

  • not very good....but thankssss:)

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more