MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / Search

Function Search

CPP/Trees/BinarySearchTree.cpp:38–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38bool Search(BSTNode* root, int data)
39{
40 if(root == NUL)
41 return false;
42 else if(root -> data == data)
43 return true;
44 else if(data <= root -> data)
45 return Search(root -> left, data);
46 else
47 return Search(root -> right, data);
48}
49
50int main()
51{

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected