Search⌘ K
AI Features

What is 2-3 Tree?

Explore the fundamentals of 2-3 Trees, a type of balanced and ordered search tree. Understand their structure, key properties maintaining balance, and how they ensure efficient logarithmic time operations. This lesson prepares you to implement and work with 2-3 Trees effectively.

Introduction

A 2-3 Tree is another form of search tree but is very different from Binary Search Tree. Unlike BST, 2-3 Tree is a balanced and ordered search tree which provides a very efficient storage mechanism to guarantee fast operations. In this chapter, we will take a detailed look at 2-3 Trees’ structure, the limitations it follows, and how elements are inserted and deleted from it.

One key feature of a 2-3 Tree is that it remains balanced, no matter how many insertions or deletion you perform. The leaf nodes are always present on the same level and are quite small in number. This is to make sure the ...