March 2020
Intermediate to advanced
406 pages
8h 39m
English
Binary trees are an important data structure in computer science. They are often used for search, priority queues, and databases. They are efficient because they are easy to traverse in a concurrent fashion. Go has great concurrency primitives (which we'll discuss in Chapter 3, Understanding Concurrency) that allow us to do this in a simple manner. Being able to use goroutines and channels to walk a binary tree can help speed up how we traverse a grouping of hierarchical data. A balanced binary tree can be seen in the following diagram:

A couple of special binary trees are as follows:
Read now
Unlock full access