MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / binaryTreePaths

Method binaryTreePaths

TreeBinaryTreePaths.java:4–10  ·  view source on GitHub ↗
(TreeNode root)

Source from the content-addressed store, hash-verified

2class Solution {
3
4 public List<String> binaryTreePaths(TreeNode root)
5 {
6 ArrayList<String> list = new ArrayList<>();
7 if(root==null) return list;
8 paths(root,"",list);
9 return list;
10 }
11
12 public static boolean paths(TreeNode root,String S, ArrayList<String> list)
13 {

Callers

nothing calls this directly

Calls 1

pathsMethod · 0.95

Tested by

no test coverage detected