Jump to content

Bubble sorting a list

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
0eraser

0eraser

    Newbie

  • Members
  • Pip
  • 3 posts
Well - how exactly would that work? Would you have to go through all of the elements? I have some ideas in my head ,but could someone just help me out a bit :)

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You would need a nested for loop that repeatedly goes through all the elements. If you are using C++, you are better off using the built in sorting routines for container classes.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog