Types of Algorithms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Brute Force

A

straightforward approach to solve problem by trying all possible solutions

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

Greedy

A

make the locally optimal choice at each stage with the hope that these local solutions will lead to a global optimum

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

Dynamic Programming

A

divide the problem into smaller subproblems and storing the solutions to subproblems to avoid redundant calculations

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

Divide & Conquer

A

divide the problem into smaller subproblems, solve them independently and then combine the results to solve overall problem

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

Backtracking

A

Systematically explore all possible solutions by trying and rejecting possibilities based on constraints

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

A _____ approach to finding the smallest coin combination to make a certain amount of money involves picking the largest coins first

A

Greedy Algorithm

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

Merge Sort divides an array into two halves, sorts each half, and then merges them back together. This is an example of:

A

Divide and Conquer Algorithms

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

_______ stores the solutions to overlapping subproblems so that you do not solve the same problem multiple times. It’s used for optimization problems.

A

Dynamic Programming

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