
Height balance
Height balance in a tree data structure means that the difference in height between the left and right subtrees of any node is kept small, typically no more than one or two levels. This balance helps ensure that operations like search, insert, and delete remain efficient by preventing the tree from becoming too "skewed" or lopsided. When a tree is height-balanced, the maximum number of steps needed to find an item is minimized, keeping the performance predictable and fast even as more data is added. In essence, height balance maintains an optimal shape for quick data access.