全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Balanced tree, degenerate tree?

又称: balanced tree · degenerate tree

Definition 25.8 High School Computer Science · 第 25 章 — Trees and Binary Search Trees

A binary tree is balanced when its height is close to the smallest possible for its size, about the number of halvings of nn. It is degenerate when every node has at most one child: it is then a list, of height n−1n - 1.

The same seven keys, two orders of insertion. Finding 7 visits seven nodes on the left, three on the right.
The same seven keys, two orders of insertion. Finding 77 visits seven nodes on the left, three on the right.
在原文中阅读 →