Sorting_Vizualizer is a JavaFX desktop application for visualizing and interacting with classic sorting algorithms. It provides an educational, animated interface to help users understand how different sorting algorithms work step by step.
- Visualize Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, and Quick Sort
- Step-by-step animations using JavaFX Timeline
- Custom array input and random array generation
- Adjustable animation speed
- View detailed explanations and pseudocode for each algorithm
- Modern, responsive UI with clear color legends
- Simple "About" section with project information
- Clone the repository
- Open in your Java IDE (VS Code, IntelliJ, etc.)
- Run
src/App.javaas a JavaFX application
Note: JavaFX must be configured in your IDE. No external dependencies or build scripts are required.
src/App.java- Application entry pointsrc/view.fxml- UI layout (FXML)src/Controller.java- Main controller for UI logicsrc/SortingAlgorithms.java- Sorting algorithm implementations with animationsrc/AlgorithmDescription.java- Algorithm explanations and pseudocodesrc/App.css- Centralized UI styling
- Implement the algorithm in
SortingAlgorithms.java(with animation support) - Add its name to the
AlgorithmChoiceBox inController.javaandview.fxml - Add a description and pseudocode in
AlgorithmDescription.java
- The application uses JavaFX's
TimelineandKeyFrameclasses to create smooth animations. - Each sorting algorithm is implemented as a state machine where different states represent different phases of the algorithm execution
- The states are
initial,comparing,swappingandsorted. - The visualization updates at each step to show the current state of the sorting process
- Color coding is used to indicate different element states (unsorted, comparing, sorted, etc.)
- Performance metrics (comparisons and swaps) are tracked and displayed in real-time
Pull requests are welcome! Please follow the existing code style and update documentation as needed.