| 1 | public class Diameter { |
| 2 | static class Node { |
| 3 | int data; |
| 4 | Node left, right; |
| 5 | |
| 6 | public Node(int data) { |
| 7 | this.data = data; |
| 8 | this.left = null; |
| 9 | this.right = null; |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | public static int height(Node root) { |
| 14 | if(root == null) { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…