/sorting-algorithms

Various sorting algorithms implemented in JavaScript

Primary LanguageJavaScript

Sorting Algorithms

The purpose behind this project is to provide implementations for various common sorting algorithms in computer science. In addition to providing implementation details, another goal is to provide enough documentation for students to learn and understand how these sorting algorithms work.

For now, the sorting algorithms included in this project are:

  1. Selection Sort ( O(n^2) )
  2. Bubble Sort ( O(n^2) )
  3. Insertion Sort ( O(n^2) )
  4. Merge Sort ( O(n * log(n)) )
  5. Quick Sort ( O(n * log(n)) )

Languages

  1. JavaScript
  2. Ruby

How to Use

  1. Include the 'javascript/sorting-algorithms.js' file in your application.
  2. By including the above file, the object '_sa' will be available in the global environment.