MCPcopy Index your code
hub / github.com/careercup/ctci / height

Method height

java/CtCILibrary/CtCILibrary/TreeNode.java:69–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 }
68
69 public int height() {
70 int leftHeight = left != null ? left.height() : 0;
71 int rightHeight = right != null ? right.height() : 0;
72 return 1 + Math.max(leftHeight, rightHeight);
73 }
74
75 public TreeNode find(int d) {
76 if (d == data) {

Callers 1

mainMethod · 0.95

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected