An implementation of the Bogo Sort algorithm in React.
Bogo Sort is a highly inefficient sorting algorithm that generates random permutations of the input array and checks if it is sorted. It continues this process until the array is sorted. The app provides a visual representation of the sorting process, along with additional information about the number of iterations and time complexity.
The live site for the application can be accessed here.
git clone git@github.com:ShlokBharadwaj/bogo-sort-app.git
cd bogo-sort-app
npm i
npm run dev
Open your browser and go to http://localhost:5173/bogo-sort-app/ to view the application.
- Enter a list of numbers separated by space in the textarea.
- Observe the animated sorting process.
- View information about the sorting process, including the number of iterations and time complexity.
You can customize the sorting interval in the App.jsx
file. Locate the sortInterval
declaration and modify the interval duration as needed.
sortInterval = setInterval(sortArray, 1000); // Change the interval duration (in milliseconds)
- React
- Vite
- JavaScript
- Tailwind CSS
Feel free to open an issue if you encounter any problems or have suggestions for improvements. Contributions are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.