March 2019
Intermediate to advanced
336 pages
9h 9m
English
The Search method of the TreeSet class takes a variable argument named treeNodes of the TreeNode type and returns true if one of those treeNodes exists; otherwise, it returns false. The code following snippet outlines the Search method:
// Search methodfunc (treeset *TreeSet) Search(treeNodes ...TreeNode) bool { var treeNode TreeNode var exists bool for _, treeNode = range treeNodes { if exists = treeset.bst.SearchNode(treeNode.key); !exists { return false } } return true}
Read now
Unlock full access