# 2-3 Tree

2-3 tree is a way to generalize BSTs to provide the flexibility that we need to guarantee fast performance. In 2-node, we have one link for the keys that are less than the key in the node, and one link for the keys that are greater. In a 3-node, we need three links, one for less, one for between and one for greater.

![2-3 Tree](https://1133441777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP3gpNOfmHBf90k26iY%2Fuploads%2Fgit-blob-ae833db3452f7d30c97fba993a7b16872f58e5a2%2Fimage%20\(37\).png?alt=media)

Each transformation maintains the symmetric order and perfect balance

![](https://1133441777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP3gpNOfmHBf90k26iY%2Fuploads%2Fgit-blob-74998e1d2281c8493272b18dd61f4968b507408a%2Fimage%20\(62\).png?alt=media)
