Category Archives: Sorting Algorithms

Basic code examples of sorting algorithms.

Merge Sort Algorithm

A basic implementation of a merge sort algorithm. Running a test file of 100000 randomly ordered integers through this algorithm takes about 4.54 seconds on my system. I will be using the same test file for comparison against other sorting … Continue reading

Posted in Java, Sorting Algorithms | Leave a comment

Selection Sort Algorithm

A simple example of the selection sort algorithm. Running a test file of 100000 randomly ordered integers through this algorithm takes about 4.72 seconds on my system. I will be using the same test file for comparison against other sorting … Continue reading

Posted in Java, Sorting Algorithms | Leave a comment

Insertion Sort Algorithm

A Java example of the insertion sort algorithm. Running a test file of 100000 randomly ordered integers through this algorithm takes about 1.53 seconds on my system. I will be using the same test file for comparison against other sorting … Continue reading

Posted in Java, Sorting Algorithms | Leave a comment

Bubble Sort Algorithm

A basic example of the bubble sort algorithm in Java. Running a test file of 100000 randomly ordered integers through this algorithm takes about 15.8 seconds on my system. I will be using the same test file for comparison against … Continue reading

Posted in Java, Sorting Algorithms | Leave a comment