I dont know how to do bubble sort, it seems overly complicated and takes a long time to find. Do you know any cases where it's best? Then again I only know linear sort.
Bubble sorting actually is probably one or the simplest algorithms. Bubble sort basically looks at (from 0) each array item, and compares it to the one after that. If the one after it is bigger, swap the two values. It does this all the way to the end, until it's finished. Surprisingly easy to code.
Apparently I've been doing bubble sort... I didn't know there was a swap function though. Most programming languages require the use of a temporary placeholder, so here is what it usually looks like.