Skip to content

🎨 Interactive Bubble Sort Visualizer with real-time animations, gradient colors, and live statistics. Built with C++ and SFML.

Notifications You must be signed in to change notification settings

haladayyeh/bubble_sort_visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Bubble Sort Visualizer

Beautiful real-time visualization of the Bubble Sort algorithm

✨ Features

  • 🌈 Dynamic Gradient Colors
  • πŸ“Š Real-time Statistics (Comparisons & Swaps)
  • 🎬 Smooth Animations
  • 🎯 Color-coded Comparisons
  • βœ… Completion Indicator
  • 🎨 Modern Dark Theme UI

πŸ› οΈ Requirements

  • C++ Compiler (GCC 7+, Clang 5+, or MSVC 2017+)
  • SFML 2.5+

πŸ“¦ Installation

Linux (Ubuntu/Debian)

sudo apt-get update
sudo apt-get install libsfml-dev

macOS

brew install sfml

Windows

Download SFML from official website

πŸš€ Usage

Clone

git clone https://github.com/haladayyeh/bubble-sort-visualizer.git
cd bubble-sort-visualizer

Compile

g++ bubble_sort_visualizer.cpp -o visualizer -lsfml-graphics -lsfml-window -lsfml-system -std=c++11

Run

./visualizer

πŸ”§ Customization

Modify the data array:

vector<int> data = {180, 90, 150, 50, 120, 40, 200, 70, 160, 100, 140, 80};

Adjust animation speed:

sleep(milliseconds(50));  // Change 50 to your preferred speed

🎯 Algorithm Complexity

  • Time Complexity: O(nΒ²)
  • Space Complexity: O(1)
  • Best Case: O(n)
  • Worst Case: O(nΒ²)

🀝 Contributing

Contributions are welcome! Feel free to fork and submit pull requests.

πŸ“„ License

MIT License - feel free to use this project for learning and educational purposes.

🌟 Show Your Support

Give a ⭐️ if this project helped you!


πŸ‘€ Author

hala dayyeh

Made with ❀️ and C++

About

🎨 Interactive Bubble Sort Visualizer with real-time animations, gradient colors, and live statistics. Built with C++ and SFML.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages