# Sorting Visualization Program
## Overview
This C++ program visualizes various sorting algorithms by displaying an array of integers as bars on the screen. The user can choose from five sorting algorithms to sort the array, which is visualized step-by-step to help understand how each algorithm works.
## Features
- **Bubble Sort**
- **Selection Sort**
- **Insertion Sort**
- **Quick Sort**
- **Heap Sort**
## How to Use
1. **Compile and Run**: Compile the program using a C++ compiler (e.g., `g++`), and run the executable.
2. **Enter Array Size**: Input the size of the array when prompted.
3. **Select Sorting Algorithm**: Choose one of the available sorting algorithms by entering the corresponding number.
4. **Visualize Sorting**: The program will display the sorting process step-by-step. After each step, it will clear the screen to show the updated state of the array.
5. **Play Again**: After sorting is complete, you can choose to sort a new array by entering 'y' or exit the program by entering 'n'.
## Notes
- **Visualization**: The array is represented as bars, where each bar's length corresponds to the value of the array element.
- **Delays**: There are delays included between sorting steps to visualize the changes. Adjust the delay function as needed.
- **System Compatibility**: `system("cls")` is used to clear the screen for Windows. If using another operating system, replace `system("cls")` with `system("clear")` for Unix-based systems.
## Example
```plaintext
Enter the size of the array: 5
Generated array: 4 2 6 1 5
----------------------------------------------
Select the sorting algorithm:
1. Bubble Sort
2. Selection Sort
3. Insertion Sort
4. Quick Sort
5. Heap Sort
Enter your choice: 1
## License
This project is licensed under the MIT License. See the LICENSE file for more details.