push_swap visualizer

Instructions 0

Apply an operation to the stacks and append it to the list.

Push
Swap
Rotate
Reverse rotate
One instruction per line

Stacks

Stack A0
Stack B0

Stack A is empty

Generate random numbers or paste your own in the Generate section on the left.

Push Swap Visualizer: see what your sorting algorithm actually does

The Push Swap Visualizer is an interactive tool for developers, students and coding enthusiasts working on the push_swap sorting algorithm in C. It animates, step by step, how numbers move between two stacks (A and B) using the project's fixed set of operations.

Features

Why visualize push_swap?

Push swap is hard to reason about without seeing it. A visualizer helps you:

Made for 42 School projects

If you're working on the push_swap project at 42 School, this tool helps you build an efficient algorithm while minimizing the number of moves, a key factor in your grade.

Is the visualizer helping?

A star on GitHub helps other 42 students find it. Something broken? Open an issue.