Workshop 7 - Binary Trees Flashcards

1
Q

Hierarchral data

A

Unique presdessor and many sucessors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Binary Search tree

A

every node is of degrees two or less.

key in left subtree of the root preceeds the key in the root.

key in root node precedes the keys in right tree.

left and right subtrees of the root are also BST.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

BST Deletion

A

Three cases:

Case 1 - The node is a leaf node
Case 2 - The node has one subtree.
Case 3 - The node has two subtrees.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

depth first traersal info

A

stack is used..

proceeedd along a path from root through one child to most distant descendant of the first child before processsing the second child.

PreOrder,InOrder,PostOrder

leaf by leaf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

breadth first travesel info

A

Queue is used.

proceeds horizontally from root of all its children then to its children.

uses a queue.

level by level.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

depth first traersal

A

V - Visit node
L - Traverse the Left subtree.
R - Traverse the Right subtree.

Three used:

VLR - PreOrder Traversal
LVR - InOrder Traversal
LRV - PostOrder Traversal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

breadth first travesel

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly