Skip to content

Instantly share code, notes, and snippets.

@ecere
Created January 24, 2013 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecere/4617309 to your computer and use it in GitHub Desktop.
Save ecere/4617309 to your computer and use it in GitHub Desktop.
#include "sort.h"
void SRT_Bubble(sort_t *Array, WORD Count)
{
WORD c1,c2;
sort_t tmp;
for(c1=0; c1<Count; c1++)
for(c2=Count-1; c2>c1; c2--)
if(Array[c1].Compared>Array[c2].Compared)
{
tmp=Array[c1];
Array[c1]=Array[c2];
Array[c2]=tmp;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment