Skip to content

robertocoratti/sorting

Repository files navigation

Sorting Visualizer

Tests Coverage – Algorithms Coverage – Core logic TypeScript React Vite Tailwind CSS License: MIT

A web application that visualizes 11 sorting algorithms step-by-step, with playback controls, adjustable animation speed, and complexity information for each algorithm.

sorting.robertocoratti.com

Screenshot

Algorithms

Algorithm Time (best) Time (avg) Time (worst) Space
Bubble Sort O(n) O(n²) O(n²) O(1)
Insertion Sort O(n) O(n²) O(n²) O(1)
Selection Sort O(n²) O(n²) O(n²) O(1)
Shell Sort O(n log n) O(n log n) O(n log² n) O(1)
Merge Sort O(n log n) O(n log n) O(n log n) O(n)
Quick Sort O(n log n) O(n log n) O(n²) O(log n)
Heap Sort O(n log n) O(n log n) O(n log n) O(1)
Cocktail Shaker Sort O(n) O(n²) O(n²) O(1)
Gnome Sort O(n) O(n²) O(n²) O(1)
Comb Sort O(n log n) O(n²) O(n²) O(1)
Counting Sort O(n+k) O(n+k) O(n+k) O(k)

Stack

  • React 18 + TypeScript 5 — UI and logic
  • Vite 4 — build tool
  • Tailwind CSS 3 + Framer Motion — styling and animations
  • Vitest + Testing Library — unit and hook testing

Getting started

pnpm install
pnpm dev

Run tests:

pnpm test
pnpm test --coverage

Contributors