Pre-Order Traversal
Domain: Data Structures
🎯 Motivation
Visit the root first, then left subtree, then right subtree. Useful for copying trees or writing structured documents.
📋 Concrete Example
For tree A(B(D,E), C): pre-order gives A, B, D, E, C. The root always comes first in each subtree.
🔗 Analogy
Exploring a mall: you enter a shop, then explore its left branch of corridors, then the right branch. You always note the shop before its corridors.