2-3树插入 [英] 2-3 tree insertion

查看:126
本文介绍了2-3树插入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在学校3棵树,试图找到例子如何插入和建立一个2-3树,我发现的答案与我所学到的不同。我想要一个2-3树,m-1像下面这样。我知道答案,但我不知道如何建立它。有人可以告诉我如何使用我在这2-3和从哪里开始的这些元素来构建一个元素。

  45_ 

14 25 50_

1 3_ 14 17 _ 25 27 30 45 _ _ 50 57 _


解决方案

在C ++中实现2 3树


3 trees at school and after trying to find examples how to insert and build a 2-3 tree the answers that I found were different from what I learned. I want an 2-3 tree with m-1 like the following. I know the answer but I don't know how to build it. Can someone please show me how to build one using these elements which I got in this 2-3 and from where to begin

                                    45_

                            14 25        50_

     1 3_   14 17 _   25 27 30            45 _ _   50 57 _ 

解决方案

There is an implementation of a 2 3 tree at Implementing a 2 3 Tree in C++.

这篇关于2-3树插入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆