Skip to content

dpantaleoni/DSAVisualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

DSA Visualizer

A real-time sorting algorithm visualizer built with Python and Pygame.

Features

  • Interactive Visualization: Watch sorting algorithms in action with highlighted comparisons and swaps
  • Multiple Algorithms: Currently supports Bubble Sort and Quick Sort
  • Real-time Performance: 60 FPS visualization with configurable delay
  • Customizable Data: Adjustable array size (currently set to 200 elements)

Requirements

  • Python 3.x
  • pygame
  • numpy

Installation

pip install pygame numpy

Usage

python start.py

Controls

  • Click Bubble Sort to visualize bubble sort algorithm
  • Click Quick Sort to visualize quick sort algorithm
  • Close window to exit

Algorithm Details

  • Bubble Sort: O(n²) time complexity, compares adjacent elements
  • Quick Sort: O(n log n) average case, uses iterative approach with stack to avoid recursion overflow

Customization

Modify the n variable in main() to change the number of elements (default: 200).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages