Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Balanced tree, degenerate tree » ?

Aussi appelé : balanced tree · degenerate tree

Definition 25.8 High School Computer Science · Chapitre 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.
Lire dans le chapitre →