Skip to content

About

Sorting Stick is a visual representation of popular sorting algorithms built using SFML (Simple and Fast Multimedia Library) in C++. This educational game helps users understand how different sorting algorithms operate by animating their processes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Sorting Stick

Sorting Stick is a visual representation of popular sorting algorithms built using SFML (Simple and Fast Multimedia Library) in C++. This educational game helps users understand how different sorting algorithms operate by animating their processes.

🖥️ 🛠️ Technologies Used

  • C++
  • SFML (Simple and Fast Multimedia Library)

📚 Algorithms Demonstrated

  • Bubble Sort – Repeatedly swaps adjacent sticks if they are in the wrong order, bubbling the largest to the end.
  • Insertion Sort – Builds the sorted array one stick at a time by inserting elements into their correct position.
  • Selection Sort – Finds the smallest stick in each pass and places it at the correct position from the start.
  • Merge Sort – Divides the array into halves, recursively sorts them, and merges the sorted halves.
  • Quick Sort – Partitions the array around a pivot and recursively sorts the sub-arrays.
  • Radix Sort – Sorts sticks by processing digits from least to most significant using counting sort as a subroutine.

💡 Data Structure Used

  • The sticks are stored in a dynamic array
  • Each Stick is a custom struct that contains properties such as height and color, used for visualization.

🎮 Features

  • Real-time visual feedback for sorting operations
  • Highlights each step during the sort
  • Educational tool for beginners to understand sorting algorithms visually

🚀 How to Run

Prerequisites

  • SFML installed on your system

Steps

  1. Clone the repository:

    git clone https://github.com/Chintan-Patel-Games/Sorting-Stick.git
  2. Run the executable

📚 Concepts Demonstrated

  • Bubble Sort
  • Insertion Sort
  • Selection Sort
  • Merge Sort
  • Quick Sort
  • Radix Sort

About

Sorting Stick is a visual representation of popular sorting algorithms built using SFML (Simple and Fast Multimedia Library) in C++. This educational game helps users understand how different sorting algorithms operate by animating their processes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages