March 2019
Intermediate to advanced
336 pages
9h 9m
English
In the following code snippet, the BinarySearchTree class consists of a rootNode that's of the TreeNode type, and lock, which is of the sync.RWMutex type. The binary search tree is traversed from rootNode by accessing the nodes to the left and right of rootNode:
// BinarySearchTree classtype BinarySearchTree struct { rootNode *TreeNode lock sync.RWMutex}
Now that we know what BinarySearchTree is, let's take a look at its different methods in the next section.
Read now
Unlock full access