Developer

This experience deserves a bigger screen

The DSA Visualizer is designed for deep focus,
side-by-side code, and real-time execution insight.

On small screens, that level of clarity can't be preserved.

Open on a tablet (landscape) or desktop for the intended experience.

Desktop experience preview

Quick SortStep-by-Step Visualization

QuickSort is a highly efficient sorting algorithm and is based on partitioning of array of data into smaller arrays.

Problem Statement

Sort an array of integers using Quick Sort.

Approach

Pick an element as pivot and partition the given array around the picked pivot. Elements smaller than pivot go to left, greater go to right. Recursively sort the partitions.

Time & Space Complexity

Time complexity is O(n log n) on average, but O(n^2) in worst case (rare with good pivot choice). Space complexity is O(log n) for recursion stack.

Interactive Visualization

Loading Interactive Visualizer...

Click "Play" or use arrow keys to step through the execution.