Compsci Unit 8 Review

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/34

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

35 Terms

1
New cards

Recursion

when a method calls itself until some terminating condition is met (without loops)

2
New cards

Stacks

dynamic data structures that follow a Last In, First Out protocol

3
New cards

Queues

dynamic data structures that follow a First In, First Out protocol

4
New cards

.push()

adds an item to the top of the stack

5
New cards

.pop()

references and removes the item from the top of the stack

6
New cards

.isEmpty() stacks

returns true if the stack is empty

7
New cards

.enqueue()

adds an element to the end of a queue

8
New cards

.dequeue()

removes and returns the first element in the queue

9
New cards

.isEmpty() queues

returns true if there are no more elements in the queue

10
New cards

Linked Lists

data structures that consist of nodes that contain data and an address to the location of the next piece of data

11
New cards

head

the first node that contains no data and an address to the first piece of data

12
New cards

node

contains a piece of data and an address to the next piece of data

13
New cards

tail

the last node that just contains data and “null” address

14
New cards

Doubly Linked Lists

nodes contain data and two pointers. one pointer points to the next node. one pointer points to the previous node

15
New cards

Circular Linked Lists

the tail pointer is no longer null, instead it points back to the first element in the linked list

16
New cards

Trees

they belong to the graph family of data structures. the top node is connected to one or more nodes on the next level that leads to the shape of an upside down tree

17
New cards

Binary Trees

a tree that has at most two children

18
New cards

Binary Search Trees

a binary tree where a node’s left-hand child has a key less than the parent while the right-hand child has a key greater than the parent

19
New cards

Inorder Traversal

  1. left hand subtree

  2. visits current node

  3. right hand subtree

20
New cards

Preorder Traversal

  1. visits current node

  2. left hand subtree

  3. right hand subtree

21
New cards

Postorder Traversal

  1. left hand subtree

  2. right hand subtree

  3. visits current node

22
New cards

Infix Notation

the operator is placed between two operands

23
New cards

Postfix Notation

the operator follows the operands

24
New cards

Prefix Notation

the operator comes before the operand

25
New cards

Children / child node

the nodes below a given node

26
New cards

Key

a data field of a node, which may be used to search for the node or perform other operations on it

27
New cards

Leaf

a node that has no children

28
New cards

Level

refers to how many generations the node is from the root

29
New cards

Height

number of edges from the top node to the deepest leaf

30
New cards

Parent

all nodes except from the root, which has no parent node, have exactly one edge running upward to their parent node

31
New cards

Path

suppose one wants to travel, from node to node, along the edges that link them. The sequence of nodes that are travelled is called a ______

32
New cards

Root

the node at the top of the tree

33
New cards

Subtree

Any node may be considered to be the root of a _____. That ______ will consists of the node’s descendants

34
New cards

Traversing

to visit all the nodes of the tree in some specified order

35
New cards

Visiting

to arrive at a node for the purpose of performing some operation on the node