# Re: data structure

**URL:** <https://www.ruby-forum.com/t/re-data-structure/141876>\
**Category:** Ruby\
**Created:** [July 1, 2008, 10:18am UTC](https://www.ruby-forum.com/t/re-data-structure/141876 "2008-07-01T10:18:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stickstone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Post date:** [July 1, 2008, 10:18am UTC](https://www.ruby-forum.com/t/re-data-structure/141876/1 "2008-07-01T10:18:50Z")

</div>

> I know I have to use AVL principles of rotation, but since text books  
> explain only for binary trees

Then you’re not looking in the right text books. See for example the  
classic  
Sedgewick “Algorithms” book.

The following reading may be useful:

> **[2–3–4 tree](https://en.wikipedia.org/wiki/2-3-4_tree)**
>
> In computer science, a 2–3–4 tree (also called a 2–4 tree) is a self-balancing data structure that can be used to implement dictionaries. The numbers mean a tree where every node with children (internal node) has either two, three, or four child nodes:
> 2-node
> 3-node
> 4-node

> **[B-tree](https://en.wikipedia.org/wiki/B-tree)**
>
> In computer science, a B-tree is a self-balancing tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time. The B-tree generalizes the binary search tree, allowing for nodes with more than two children. Unlike other self-balancing binary search trees, the B-tree is well suited for storage systems that read and write relatively large blocks of data, such as databases and file systems.
> B-trees were invented by Rudolf Bayer...

[http://www.catb.org/~esr/faqs/smart-questions.html#homework](http://www.catb.org/~esr/faqs/smart-questions.html#homework)
