GO-V.ORG
As seen in

2–3 tree

In computer science, a 2–3 tree is a tree data structure, where every node with children (internal node) has either two children (2-node) and one data element or three children (3-node) and two data elements.[src] A 2–3 tree is a B-tree of order 3.[src] Nodes on the outside of the tree (leaf nodes) have no children and one or two data elements.[src] 2–3 trees were invented by John Hopcroft in 1970.[src] 2–3 trees are required to be balanced, meaning that each leaf is at the same level.[src] It follows that each right, center, and left subtree of a node contains the same or close to the same amount of data.[src]

In computer science, a 2–3 tree is a tree data structure, where every node with children (internal node) has either two children (2-node) and one data element or three children (3-node) and two data elements.[src] A 2–3 tree is a B-tree of order 3.[src] Nodes on the outside of the tree (leaf nodes) have no children and one or two data elements.[src] 2–3 trees were invented by John Hopcroft in 1970.[src] 2–3 trees are required to be balanced, meaning that each leaf is at the same level.[src] It follows that each right, center, and left subtree of a node contains the same or close to the same amount of data.[src] ==Definitions== We say that an internal node is a 2-node if it has one data element and two children.[src] We say that an internal node is a 3-node if it has two data elements and three children.[src] A 4-node, with three data elements, may be temporarily created during manipulation of the tree but is never persistently stored in the tree.[src] Image:2-3-4 tree 2-node.svg|2 node Image:2-3-4-tree 3-node.svg|3 node We say that is a 2–3 tree if and only if one of the following statements hold: is empty.[src] In other words, does not have any nodes.[src] is a 2-node with data element .[src] If has left child and right child , then and are 2–3 trees of the same height; is greater than each element in ; and is less than each data element in .[src] is a 3-node with data elements and , where .[src] If has left child , middle child , and right child , then , , and are 2–3 trees of equal height; is greater than each data element in and less than each data element in ; and is greater than each data element in and less than each data element in .[src] ==Properties== Every internal node is a 2-node or a 3-node.[src] All leaves are at the same level.[src] All data is kept in sorted order.[src] ==Operations== ===Searching=== Searching for an item in a 2–3 tree is similar to searching for an item in a binary search tree.[src] Since the data elements in each node are ordered, a search function will be directed to the correct subtree and eventually to the correct node which contains the item.[src] Let be a 2–3 tree and be the data element we want to find.[src] If is empty, then is not in and we're done.[src] Let be the root of .[src] Suppose is a leaf.[src] If is not in , then is not in .[src] Otherwise, is in .[src] We need no further steps and we're done.[src] Suppose is a 2-node with left child and right child .[src] Let be the data element in .[src] There are three cases: If is equal to , then we've found in and we're done.[src] If d , then set to , which by definition is a 2–3 tree, and go back to step 2.[src] If d > a , then set to and go back to step 2.[src] Suppose is a 3-node with left child , middle child , and right child .[src] Let and be the two data elements of , where a .[src] There are four cases: If is equal to or , then is in and we're done.[src] If d , then set to and go back to step 2.[src] If a , then set to and go back to step 2.[src] If d > b , then set to and go back to step 2.[src] ===Insertion=== Insertion maintains the balanced property of the tree.[src] To insert into a 2-node, the new key is added to the 2-node in the appropriate order.[src] To insert into a 3-node, more work may be required depending on the location of the 3-node.[src] If the tree consists only of a 3-node, the node is split into three 2-nodes with the appropriate keys and children.[src] If the target node is a 3-node whose parent is a 2-node, the key is inserted into the 3-node to create a temporary 4-node.[src] In the illustration, the key 10 is inserted into the 2-node with 6 and 9.[src] The middle key is 9, and is promoted to the parent 2-node.[src] This leaves a 3-node of 6 and 10, which is split to be two 2-nodes held as children of the parent 3-node.[src] If the target node is a 3-node and the parent is a 3-node, a temporary 4-node is created then split as above.[src] This process continues up the tree to the root.[src] If the root must be split, then the process of a single 3-node is followed: a temporary 4-node root is split into three 2-nodes, one of which is considered to be the root.[src] This operation grows the height of the tree by one.[src] ===Deletion=== Deleting a key from a non-leaf node can be done by replacing it by its immediate predecessor or successor, and then deleting the predecessor or successor from a leaf node.[src] Deleting a key from a leaf node is easy if the leaf is a 3-node.[src] Otherwise, it may require creating a temporary 1-node which may be absorbed by reorganizing the tree, or it may repeatedly travel upwards before it can be absorbed, as a temporary 4-node may in the case of insertion.[src] Alternatively, it's possible to use an algorithm which is both top-down and bottom-up, creating temporary 4-nodes on the way down that are then destroyed as you travel back up.[src] Deletion methods are explained in more detail in the references.[src] ===Parallel operations=== Since 2–3 trees are similar in structure to red–black trees, parallel algorithms for red–black trees can be applied to 2–3 trees as well.[src] ==See also== 2–3–4 tree 2–3 heap AA tree B-tree Finger tree ==References==[src]

63 sentences · 63 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"2–3 tree." encyclopegia.org, 2026, https://encyclopegia.org/wiki/2-3-tree. Accessed 04 December 2026.

Chicago

"2–3 tree." encyclopegia.org. Accessed December 4, 2026. https://encyclopegia.org/wiki/2-3-tree.

APA

encyclopegia.org. (2026). 2–3 tree. Retrieved December 4, 2026, from https://encyclopegia.org/wiki/2-3-tree

Accessed December 4, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Ti -Tree

stub · references available

Siberian Tree Frog

stub · references available

Olive-tree Warbler

stub · references available

Tree Pipit

stub · references available

Matschie's tree-kangaroo

stub · references available

phylogenetic tree

stub · references available

Gray-bellied pencil-tailed tree-mouse

stub · references available

Pallid Atlantic Tree-rat

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1354565675 · 0.5 · snapshot enwiki-001354565675

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.