All Developer Utilities
100% Client-Side SVG Engine · Zero Server Calls
Array, Binary Tree & Graph Testcase Visualizer
Paste any LeetCode-style level-order tree array, graph edge list, or 2D matrix to instantly render a clean vector diagram and inspect traversals.
Testcase Input
DFS Traversals
Preorder: [1, 2, 4, 7, 3, 5, 6]
Inorder: [4, 7, 2, 1, 5, 3, 6]
Postorder: [7, 4, 2, 5, 6, 3, 1]
How Level-Order & Graph Layouts Work
BFS Queue Reconstruction + Inorder X-Coordinate Assignment
LeetCode represents binary trees using a BFS Level-Order Array where null marks missing children. To draw the tree without overlapping nodes, we run a DFS Inorder Traversal to assign each node's horizontal x index and its recursion depth for y.