Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将 3 个 4s 插入一个空的 B 树。t = 3。我在网上尝试了一些小程序,但所做的只是插入 4 一次,然后删除 4。它是在 CLRS 中实现的方式,因为我没有完全理解它们的伪代码。
当N变为 3 并且您进行第四次插入时,必须拆分根节点,其中至少保留 N/2 个节点,并且在每个新叶节点中。所以结果必须是一棵树,根中有 1 个键,两个叶子中分别有 1 个和 2 个键,顺序取决于您是否认为重复键出现在现有重复项之前或之后。一般是在...之后