Insertion sort and bubble sort

I have got a little sidetracked with this little challenge, and am playing around with sorting algorithms. I still hope this will lead to some cool insight into the challenge, but if not oh well.

The next two sorting algorithms I have tried out are insertion sort and bubble sort:


Bubble sort and insertion sort are both still simple sorting algorithms, with O(n^2) complexity. But I think they are pretty cool all the same. My next challenge be a binary search, which will lead to a quicksort and heap sort algorithm.


One thought on “Insertion sort and bubble sort

  1. Oddly, it took me longer to figure out how to blog this than it did to write the two sorting algorithms. I was playing around with wordpress’ tags, but they ignore indents, so it wasn’t very nice. If anyone know a way to post code with indents, let me know! – thankss


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s