This repository contains a collection of clear, well-commented implementations of classic sorting algorithms in JavaScript.
Each example is self-contained, written to run in Node.js, and includes step-by-step explanations.
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Heap Sort
- Quick Sort
- Lomuto Partition Scheme
- Hoare Partition Scheme
- Counting Sort
- Stable (with prefix sum)
- Non-stable
- Radix Sort
- Cycle Sort
- Each algorithm has clear comments explaining how it works.
- Includes example usages for testing.
- Written in simple, readable JavaScript.
- Designed for educational purposes and practice.
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git - Navigate to the folder:
cd YOUR_REPO_NAME - Run any example file with Node.js:
node bubbleSort.js