An interactive web application built with React and Vite that helps users understand how different sorting algorithms work through step-by-step visualizations.
- Interactive visualization of popular sorting algorithms:
- Bubble Sort
- Quick Sort
- Merge Sort
- Step-by-step execution control
- Adjustable animation speed
- Configurable array size
- Real-time code highlighting
- Responsive design
- React 18
- Vite
- Styled Components
- React Router DOM
- ESLint
- Node.js (v14 or higher)
- npm or yarn
- Clone the repository
git clone https://github.com/yourusername/algorithm-visualizer.git
cd algorithm-visualizer
- Install dependencies
npm install
- Start the development server
npm run dev
The application will be available at http://localhost:5173
npm run dev
- Starts the development servernpm run build
- Builds the app for productionnpm run lint
- Runs ESLint to check code qualitynpm run preview
- Previews the production build locally
-
Bubble Sort
- Time Complexity: O(n²)
- Space Complexity: O(1)
- Simple comparison-based sorting algorithm
-
Quick Sort
- Time Complexity: O(n log n)
- Space Complexity: O(log n)
- Efficient divide-and-conquer algorithm
-
Merge Sort
- Time Complexity: O(n log n)
- Space Complexity: O(n)
- Stable divide-and-conquer algorithm
- Generate new random arrays
- Control animation speed
- Step forward/backward through the sorting process
- Pause/Resume functionality
- Array size adjustment
algorithm-visualizer/
├── src/
│ ├── algorithms/ # Sorting algorithm components
│ ├── components/ # Reusable UI components
│ ├── utils/ # Utility functions
│ ├── pages/ # Page components
│ ├── App.jsx # Main application component
│ └── main.jsx # Application entry point
├── public/ # Static assets
└── index.html # HTML template
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by various algorithm visualization tools
- Built with React and modern web technologies
- Uses styled-components for styling
algorithm-visualizer's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.