Skip to content

eamonwong/Python-Sorting-Algorithm-Visualiser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

Python-Sorting-Algorithm-Visualiser

This project is a visualisation tool for sorting algorithms, built using the pygame library in Python. It allows you to visualise both Bubble Sort and Insertion Sort, with options to reset the list, start sorting, and choose between ascending and descending orders. The visualisation now includes real-time complexity analysis, showing the number of comparisons and swaps as the sorting progresses.

Features and Functionality

  • Real-time Visualisation: Watch sorting algorithms operate step by step.
  • Real-time Complexity Metrics: Displays the number of comparisons and swaps during the sorting process.
  • Two Sorting Algorithms: Bubble Sort and Insertion Sort are currently supported.
  • Custom Controls: Reset the list, toggle between sorting algorithms, and switch between ascending/descending orders.

Controls

  • R: Reset the list to a new randomly generated set of numbers.
  • SPACE: Start the sorting process.
  • A: Set sorting to ascending order.
  • D: Set sorting to descending order.
  • I: Switch to Insertion Sort.
  • B: Switch to Bubble Sort.

Whether you're a beginner looking to understand sorting or just love visualising code in action, this project is for you. Have fun sorting! 😊

PythonSortingAlgorithmVisualiser.mov

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages