AP CS - Trees Vocab

studied byStudied by 2 people
0.0(0)
get a hint
hint

Node, TreeNode

1 / 22

Tags and Description

23 Terms

1

Node, TreeNode

Stores one item, a link (pointer) to the left, and a link to the right. Links can be null.

New cards
2

Root

The topmost node. Does not have parents.

New cards
3

Parent

The predecessor of a node. Nodes only have one parent.

New cards
4

Left child

In a binary tree, the node found on the left of a parent

New cards
5

Right Child

In a binary tree, the node found on the right of a parent

New cards
6

Siblings

In a binary tree, two children who have the same parent

New cards
7

Only child

In a binary tree, nodes that do not have siblings

New cards
8

Leaf

A node that has no children

New cards
9

Edge

The pointer / link connecting two nodes

New cards
10

Path

The sequence of edges connecting nodes

New cards
11

Path length

# edges in a path

New cards
12

Depth / Level

Levels of the rows of generations in a tree; starts at 0 (the root is at level 0)

New cards
13

Height

Longest path down / depth

New cards
14

Width

Maximum height from left + Maximum height from right

New cards
15

Subtree

The root changes to a different nod within the original

New cards
16

Binary Tree

A tree where every node as 0, 1, or 2 children

New cards
17

Balanced Binary Tree

The height of the left subtree and the right subtree differ at most by one

New cards
18

Full Binary Tree

Each leaf is on the same level and everyone else has two children (perfect triangle)

New cards
19

Complete Binary Tree

Every level has as many nodes as possible, but the last one just has all the nodes to the left

New cards
20

Expression Tree (BXT)

Leaves are numbers and other are operators

New cards
21

Binary Search Tree

Left < Node < Right for all nodes

New cards
22

Min Heap

All parents are less than their children + complete (PriorityQueue)

New cards
23

Max Heap

All parents are greater than their children + complete

New cards

Explore top notes

note Note
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 24 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 44 people
Updated ... ago
4.5 Stars(2)
note Note
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 80 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 7668 people
Updated ... ago
4.5 Stars(20)

Explore top flashcards

flashcards Flashcard42 terms
studied byStudied by 16 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard55 terms
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
flashcards Flashcard122 terms
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
flashcards Flashcard34 terms
studied byStudied by 12 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard75 terms
studied byStudied by 14 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard232 terms
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard413 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard121 terms
studied byStudied by 60 people
Updated ... ago
5.0 Stars(1)