Binary search trees
16. Binary search trees#
We discussed different data structures throughout the course. Arrays helped us group several elements of the same data type into the same data structure. However, arrays were not flexible in terms of adding elements or removing elements, since they have fixed sizes. Linked lists helped us group several elements of the same data type into the same data structure, but allowed flexibility in adding and removing elements.
In this chapter, we will discuss a new data structure called a binary search tree. It is a variant of binary trees that help us in searching quickly for elements in a data structure.