Skip to content

implementations of classic sorting algorithms in JavaScript. Each example is self-contained, written to run in Node.js, and includes step-by-step explanations.

NonnaArzumanyan2024/Sorting-Algorithms

Repository files navigation

JavaScript Sorting-Algorithms

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.

Topics Covered

  • 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

Features

  • 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.

How to Run

  1. Clone the repository:
    git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
  2. Navigate to the folder:
    cd YOUR_REPO_NAME
  3. Run any example file with Node.js:
    node bubbleSort.js

About

implementations of classic sorting algorithms in JavaScript. Each example is self-contained, written to run in Node.js, and includes step-by-step explanations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published