https://www.cnblogs.com/mzyy94/p/15349185.html。
时间: 2023-06-22 11:40:37 浏览: 99
好的,以下是表格:
| 序号 | temp | level | heap | heapLength | pbound | node | 描述 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | (0, 0, [1], 9.0) | 0 | [0, (0, 0, [1], 9.0)] | 1 | 9.0 | (9.0, 9.0, [1, 2], 2) | 插入根节点 |
| 2 | (9.0, 1, [1, 2], 15.0) | 1 | [0, (15.0, 1, [1, 2], 15.0), (9.0, 9.0, [1, 2], 2)] | 2 | 9.0 | (10.0, 10.0, [1, 2, 3], 3) | 插入结点 |
| 3 | (10.0, 2, [1, 2, 3], 12.5) | 2 | [0, (15.0, 1, [1, 2], 15.0), (12.5, 2, [1, 2, 3], 12.5), (9.0, 9.0, [1, 2], 2)] | 3 | 9.0 | (11.0, 11.25, [1, 2, 3, 4], 4) | 插入结点 |
| 4 | (11.0, 3, [1, 2, 3, 4], 11.5) | 3 | [0, (11.5, 3, [1, 2, 3, 4], 11.5), (12.5, 2, [1, 2, 3], 12.5), (9.0, 9.0, [1, 2], 2), (15.0, 1, [1, 2], 15.0)] | 4 | 9.0 | (12.0, 12.5, [1, 2, 3, 4, 5], 5) | 插入结点 |
| 5 | (12.0, 4, [1, 2, 3, 4, 5], 11.0) | 4 | [0, (11.5, 3, [1, 2, 3, 4], 11.5), (12.5, 2, [1, 2, 3], 12.5), (9.0, 9.0, [1, 2], 2), (15.0, 1, [1, 2], 15.0)] | 4 | 9.0 | (13.0, 13.75, [1, 2, 3, 4, 5, 6], 6) | 插入结点 |
| 6 | (13.0, 5, [1, 2, 3, 4, 5, 6], 11.5) | 5 | [0, (11.5, 3, [1, 2, 3, 4], 11.5), (12.5, 2, [1, 2, 3], 12.5), (9.0, 9.0, [1, 2], 2), (15.0, 1, [1, 2], 15.0), (13.75, 5, [1, 2, 3, 4, 5, 6], 13.75)] | 5 | 9.0 | (14.0, 14.75, [1, 2, 3, 4, 5, 6, 7], 7) | 插入结点 |
| 7 | (14.0, 6, [1, 2, 3, 4, 5, 6, 7], 12.25) | 6 | [0, (11.5, 3, [1, 2, 3, 4], 11.5), (12.5, 2, [1, 2, 3], 12.5), (9.0, 9.0, [1, 2], 2), (15.0, 1, [1, 2], 15.0), (13.75, 5, [1, 2, 3, 4, 5, 6], 13.75)] | 5 | 9.0 | (15.0, 15.25, [1, 2, 3, 4, 5, 6, 7, 8], 8) | 插入结点 |
| 8 | (15.0, 7, [1, 2, 3, 4, 5, 6, 7, 8], 12.75) | 7 | [0, (11.5, 3, [1, 2, 3, 4], 11.5), (12.5, 2, [1, 2, 3], 12.5), (9.0, 9.0, [1, 2], 2), (15.0, 1, [1, 2], 15.0), (13.75, 5, [1, 2, 3, 4, 5, 6], 13.75), (15.25, 7, [1, 2, 3, 4, 5, 6, 7, 8], 15.25)] | 6 | 9.0 | | 最优解 |
注:表格中的 HeapNode 均省略了 parent 属性。
阅读全文