Tree balancing

In the previous chapter, we saw how binary search trees (BST’s) were used to manage data. By applying basic logic, an algorithm can easily traverse a model, searching data in O(log n) time. However, there are occasions when navigating a tree becomes inefficient - in some cases working at O(n) time. In this essay, we will review those scenarios and introduce the concept of tree balancing.