Flashcards in Section 3 Deck (11)

Loading flashcards...

1

##

What is the following calculation in reverse polish Notation: 3 * 4

### 3 4 *

2

## What is the following calculation in reverse polish Notation: (5 * 2) + 7

### 5 2 * 7 +

3

## What is the following calculation in reverse polish Notation: 5 * 4 + 3 * 2

### 5 4 * 3 2 * +

4

## what are the benefits of RPN

### RPN doesn't require brackets and can be implemented easily on a stack

5

## Which is faster - Binary search or Linear Search

### Binary Search

6

## What needs to be true before you can use Binary Search

### the list needs to be sorted

7

## What does pre-order mean

###
If each node is visited before both of its subtrees

Visit the root node (generally output it)

Do a pre-order traversal of the left subtree

Do a pre-order traversal of the right subtree

8

## what does in-order mean?

###
If each node is visited between visiting its left and right subtrees

Do an in-order traversal of the left subtree

Visit root node (generally output this)

Do an in-order traversal of the right subtree

9

## What is post-order

###
If each node is visited after its subtrees

Do a post-order traversal of the left subtree

Do a post-order traversal of the right subtree

Visit the root node (generally output this)

10

## What does the Dijkstra's Algorithm do?

### Calculates the shortest path from a starting point to an end point.

11