Skip to content

Commit aa56a10

Browse files
authored
Create Postorder Traversal.java
1 parent ead9e1e commit aa56a10

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Binary Tree/Postorder Traversal.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
public static void postorderTraversal(Node root){
2+
// base case
3+
4+
if(root == null){
5+
return;
6+
}
7+
8+
// CALL LEFT
9+
inorderTraversal(root.left);
10+
// call right
11+
inorderTraversal(root.right);
12+
// print Node
13+
System.out.println(root.data + " ");
14+
15+
}

0 commit comments

Comments
 (0)