MCPcopy Create free account
hub / github.com/careercup/ctci / find

Method find

java/CtCILibrary/CtCILibrary/TreeNode.java:75–84  ·  view source on GitHub ↗
(int d)

Source from the content-addressed store, hash-verified

73 }
74
75 public TreeNode find(int d) {
76 if (d == data) {
77 return this;
78 } else if (d <= data) {
79 return left != null ? left.find(d) : null;
80 } else if (d > data) {
81 return right != null ? right.find(d) : null;
82 }
83 return null;
84 }
85
86 private static TreeNode createMinimalBST(int arr[], int start, int end){
87 if (end < start) {

Callers 5

mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected