Preorder Traversal Technique
Preorder Traversal Technique
1) Process the root
2) Traverse left subtree
3) Traverse right subtree
Preorder Traversal Technique
1) Process the root
2) Traverse left subtree
3) Traverse right subtree
ALGOL, the root of all modern language was introduced around 1960s. It gave the concept of structured programming to Computer Science Society. ALGOL was popularized by computer scientist like Corrado Bohm, Guispee Jacopini and Edsger Dijkstra.
Write a program to show following output depending upon input n. Sample input: n=3 Sample output: 1 12 123 Sample
You can get a clear idea about basic structure of loop from this video. It will be helpful for you.