Watch sorting algorithms in action.
The Algorithm Visualizer is an interactive educational tool designed to help developers, computer science students, and enthusiasts understand how different sorting algorithms work. By representing an array of numbers as bars of varying heights, this tool animates the entire sorting process, showing the step-by-step comparisons and swaps that each algorithm performs. It's an excellent way to see the efficiency, logic, and complexity of various sorting methods in action, making abstract concepts tangible and easier to grasp.
Available Algorithms:
- Bubble Sort
- The simplest sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. Ideal for understanding basic sorting concepts.
- Selection Sort
- This algorithm divides the input list into a sorted and an unsorted region. It repeatedly selects the smallest (or largest) element from the unsorted region and moves it to the end of the sorted region.
- Insertion Sort
- A simple sorting algorithm that builds the final sorted array one item at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort.
- Merge Sort
- A highly efficient, stable, comparison-based sorting algorithm. It follows the divide-and-conquer paradigm by recursively dividing the list into sub-lists until each sub-list has only one element, then merging them in a sorted manner.
- Quick Sort
- An efficient, in-place, divide-and-conquer sorting algorithm. It works by selecting a 'pivot' element and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot.
- Select a sorting algorithm from the dropdown menu (e.g., "Bubble Sort").
- Use the "Array Size" slider to determine the number of items in the array to sort (from 10 to 100).
- Click "Generate New Array" to create a new random set of numbers to visualize.
- Use the "Speed" slider to control the animation speed for better observation.
- Click the "Sort" button to start the visualization. The bars will change color to indicate which elements are being compared, swapped, or have been sorted.
- You can pause, resume, or reset the visualization at any time using the control buttons.
Password Strength Analyzer
Test the exact strength of your passwords against realistic cracking algorithms. Discover how long it would take a hacker to guess your password.
RSA Key Pair Generator
Generate secure RSA Public and Private Key pairs securely within your browser using the native Web Crypto API. Export to standard PEM format instantly.
CIDR Subnet Calculator
Calculate IPv4 subnets, broadcast addresses, wildcard masks, and usable host ranges seamlessly with this instant CIDR notation calculator.
SQL Query Formatter
Format, beautify, and standardize your SQL queries. Instantly turn unreadable, minified, or messy SQL statements into beautifully indented and color-coded code.