Back to All Algorithms
Pre-order Traversal
Category: Tree / Graph | Time: O(n) | Space: O(h)
Visualization
Visual representation of the data structure
Enter tree data to start visualization.
About Pre-order Traversal
A tree traversal method that visits nodes in the order: root, left child, right child. It's used to create a copy of the tree.
Code Editor
The code is for reference. Editing it won't affect the visualization.
1 2 3 4 5 6 7 8 9 10 11 12
Frequently Asked Questions
About Pre-order Traversal