Home > SortingJava

SortingJava

SortingJava is a project mainly written in Java, it's free.

Java implementation of bubble and selection sort. Using only primitive types and using my own interpretation of the implementation.

Sorting

After reading some articles and trying out different things I wanted to test my knowledge of basic sorting. This is something lost to programmers who have been in the field for some time. You start to move to higher level languages like JAVA and forget most of your comp sci knowledge. Giving a simple problem like sorting a list using an old, naive, brute force algorithm can I implement it? Fortunetly, the answer is yes what was sad is how hard I struggled to remember how to do things outside of java collections and built in language functions.

Programming has changed over the years but I do not think we should forget the fundamentals. Granted we don't need someone to have a mechanical engineering degree to be a mechanic but they should at least know how to rebuild a carburetor.

Purpose

Create a class that sorts using the bubble sort method and Selection sort both seem to have O(n^2) complexity. Using nothing more then int primitives and no helper functions from the language itself so Array.sort(...) is out of the question.

Author: Sam Contapay

References

http://en.wikipedia.org/wiki/Bubble_sort

http://en.wikipedia.org/wiki/Selection_sort