The containers package provides access to the heap, list, and ring functionalities in Go. Containers are used in social networks, knowledge graphs, and other areas. Containers are lists, maps, slices, channels, heaps, queues, and treaps. Lists were introduced in Chapter 1, Data Structures and Algorithms. Maps and slices are built-in containers in Go. Channels in Go are called queues. A heap is a tree data structure. This data structure satisfies the heap property. A queue is modeled as a heap in Chapter 3, Linear Data Structures. A treap is a mix of a tree and a heap. It is a binary tree with keys and values and a heap that maintains priorities.
A ring is called a circular linked list and is presented in the next section. For this section, please refer to the circular_list.go file.