Chapter 23 Tree

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

height of tree

2 to the power of number of Levels mines 1 gives the height of the tree

Binary Search Tree

A data structure very similar to a tree with the following additional restrictions. Each node can have only 0, 1 or 2 leaf nodes. All left nodes and all of its descendants have smaller values that the root node, while all right nodes and all of it s descendants have larger values than the root node.

children

The nodes at each successive level of a tree?

path is height -1 True False

True

what is balanced node?

a node in a binary tree whose subtrees differ in height by no more than 1

interior node

a node with children but not a leaf it is also called none-leaf.

Leaf

a node with no children

what is subtree of a tree?

a subtree of the tree's root , it is rooted at a child of the tree's root.

what is general tree ?

a tree can have an arbitrary number of children

What is full and complete binary tree?

a tree is full when tree height h has all of its leaves at level h and every non leaf has exactly two children. a tree is complete if all levels of a binary tree but the last contain as many nodes as possible, and the nodes on the last level are filled in from left to right.

Subtree?

any node and its descendants form a subtree of the original tree.

Siblings?

children with same parent

A binary tree is_____

each node in binary tree has atmost two children.

Completely Balanced binary trees

each node in the tree has two subtrees whose heights are exactly the same. it has to have the only completely balanced trees are full.

the number of levels in the tree is called?

height of a tree.

What is expression tree?

is a binary tree in which the order of the children matches the order of the operands.

parent?

is a node with children

What is Tree?

is a set of nodes connected by edges that indicate the relationships among the nodes.

What are levels?

is how nodes are arranged from level one root to the leaf.

what Is the length of a path

is the number of edges that compose it.

heigh of a tree

is the number of levels in the tree

What is the height of a binary treee with n nodes?

log2(n+1)(the two is base and the n+1 is exponentially)

What is Height balanced or simply balanced?

subtree of each node in the tree differ in height by no more than 1.

Tree Children?

the nodes at each successive level of a tree

Tree ancestor?

the origins of a node the node is descendant of that node.

The height of a tee is the number of nodes along the longest path between the root and a leaf. true false

true


Set pelajaran terkait

(PrepU) Chapter 13: Blended Competencies, Clinical Reasoning and Processes of Person-Centered Care

View Set

Women's Health/Disorders and Childbearing Health Protection

View Set

APHY 201 Module 12 Fluid and Acid-Base Balance Ivy Tech

View Set

Document Examination Review Questions

View Set

Operations with Complex Numbers assessment

View Set