Displaying posts tagged: algorithms

An even quicker look at insertion sort.

No Comments
While I was on the ye old college try I went ahead and ripped the guts of bubble sort and inserted insertion sort. It is very similar to bubble sort: /* Author: Anthony Wlodarski Created On: 1/18/10 Insertion Sort Function */ // Pre: valid array // Post: returns an array sorted with the bubble sort algorithm ...

A quick look at bubble sort.

No Comments
I was just recently playing around and got to thinking I coded a bubble sort algorithm in everything from C to Scheme but not in PHP. So I took a good college try at it and this is what I came up with: /* Author: Anthony Wlodarski Created On: 1/18/10 Bubble Sort Function */ // Pre: ...