(Node node)
| 1 | class Solution |
| 2 | { |
| 3 | ArrayList <Integer> printBoundary(Node node) |
| 4 | { |
| 5 | ArrayList<Integer> list = new ArrayList<>(); |
| 6 | if(node.left!=null || node.right!=null) list.add(node.data); |
| 7 | leftBoundary(node,list); |
| 8 | leafNodes(node,list); |
| 9 | rightBoundary(node,list); |
| 10 | return list; |
| 11 | } |
| 12 | |
| 13 | void leftBoundary(Node node, ArrayList<Integer> list) |
| 14 | { |
nothing calls this directly
no test coverage detected