Algorithmic approaches Flashcards

1
Q

What is Brute force?

A

A straightforward approach to solving a problem (Usually the first solution)

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

Advantages of Brute Force

A

Conceptually simple
Usually the easiest strategy to apply

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

What is an algorithmic design strategy?

A

A general approach to
solving problems algorithmically that is applicable to a
variety of problems from different areas of computing

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

What is Divide & Conquer

A

A problem is divided into several subproblems. The subproblems are then solved (typically recursively), and combined to get the solution to the original problem.

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

What is a Greedy Algorithm?

A

At every step, make the best move you can make (locally optimal choice) until you’re done.

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

What’s an advantage of Greedy Algorithms?

A

▶ Not effort at each step
▶ Usually finds a solution very quickly
▶ The solution found is usually not bad

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

What’s a disadvantage of Greedy Algorithms?

A

▶ The solution found may NOT be the best one

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

What is iterative improvement?

A

Starting from some initial feasible solution , the algorithm proceeds to improve it by repeated applications of some simple step

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

Potential problems of Iterative improvement

A

Hard to identify an initial feasible solution.

Difficult to identify if a locally optimal next step will yield a globally optimal solution to a problem.

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

What is Dynamic programming?

A

It solves every sub-subproblem just
once and then saves its answer in a table (or array).

This avoids the work of recomputing the answer every time the sub-subproblem is encountered.

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