Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Tiwarishashwat/InterviewCodes
/ preorderTraversal
Method
preorderTraversal
TreePreorder.java:9–13 ·
view source on GitHub ↗
(TreeNode root)
Source
from the content-addressed store, hash-verified
7
preorder(root.right,list);
8
}
9
public
List<Integer> preorderTraversal(TreeNode root) {
10
List<Integer> list =
new
ArrayList<Integer>();
11
preorder(root,list);
12
return
list;
13
}
14
}
Callers
nothing calls this directly
Calls
1
preorder
Method · 0.95
Tested by
no test coverage detected