Skip to content

A colour-coded sorting algorithm visualizer built with a React frontend and Python (Flask) backend, featuring 10 different algorithms and real-time colour-coded animations.

Notifications You must be signed in to change notification settings

ToJasonYu/sorting-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Sorting Visualizer

A web application with frontend + backend, designed to visualize how classic sorting algorithms work in real-time. This project is architected with a React frontend for dynamic rendering and a separate Python (Flask) backend to handle the algorithmic logic, demonstrating a clean client-server separation.

Project Screenshot

πŸš€ Key Features

  • 10 Different Algorithms: Visualizes a wide range of sorting methods, from standard efficient algorithms (Quick Sort, Merge Sort) to educational ones (Bubble Sort, Gnome Sort).
  • Real-Time Animations: Watch the array sort step-by-step with color-coded states (Active, Locked, Unsorted).
  • Decoupled Architecture: The sorting logic resides entirely on the Python backend, sending animation steps to the React frontend via a REST API.
  • Speed & Size Control: Interactive sliders to adjust array size and visualization speed.
  • Complexity Analysis: Displays Time and Space complexity (Big O) for the selected algorithm.
  • Code Viewer: View the actual implementation code for each algorithm in Python, Java, and JavaScript.

πŸ› οΈ Tech Stack

  • Frontend: React.js, Vite, CSS3
  • Backend: Python 3, Flask, CORS
  • Deployment: Render (Separate services for Static Site and Web Service)
  • Communication: REST API (Axios)

πŸ“‚ Project Structure

This project follows a professional separation of concerns:

/
β”œβ”€β”€ frontend/         # React Client (UI & Animation Logic)
β”‚   β”œβ”€β”€ src/          # Components, hooks, and styles
β”‚   └── dist/         # Production build artifacts
β”œβ”€β”€ backend/          # Python API (Server & Algorithms)
β”‚   β”œβ”€β”€ app.py        # Flask entry point
β”‚   └── sorting_algorithms.py # Pure Python implementations
└── README.md

About

A colour-coded sorting algorithm visualizer built with a React frontend and Python (Flask) backend, featuring 10 different algorithms and real-time colour-coded animations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published