Tired of the difficult projects and exams? Now’s your chance to get back at your professor…. with whipped cream.
As tradition holds, we’ll be having Professor Pie-ing at CSE Spring BBQ (it’s on May 22nd – only three weeks away! More details can be found on the Facebook event).
You can nominate professors you want to see get pied here: https://catalyst.uw.edu/webq/survey/psethi17/269995
This Spring BBQ is going to be one of the best ones yet. Seriously. We ACM officers are super excited. So make sure you come. You’ll see… 😉
public static void BubbleSort( int [ ] num )
{
int j;
boolean flag = true; // set flag to true to begin first pass
int temp; //holding variable
while ( flag )
{
flag= false; //set flag to false awaiting a possible swap
for( j=0; j < num.length -1; j++ )
{
if ( num[ j ] < num[j+1] ) // change to > for ascending sort
{
temp = num[ j ]; //swap elements
num[ j ] = num[ j+1 ];
num[ j+1 ] = temp;
flag = true; //shows a swap occurred
}
}
}
}