Algorithms Flashcards

1
Q

algorithm

A

finite sequence of operations for carrying out a procedure or solving a problem

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

what must an algorithm be?

A
  • unambiguous
  • deterministics
  • finite
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how can algorithms be communicated?

A

flowchart or pseudocode

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

pass

A

worked through the instructions once

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

efficiency

A

using fewer operations

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

pseudocode

A

concise instructions that structure a computer code

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

slack variables

A

non negative statements equivalent to inequalities in standard form

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

size

A

measure of complexity, likely to be the number of the elements in the list

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

complexity

A

efficiency in relation to the size of the problem

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

which is more efficient nested or expanded form?

A

nested method, lower complexity O(n)

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

first fit algorithm

A

first bin that has enough space for it

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

first fit decreasing algorithm

A

order from largest to smallest and apply the first-fit method to it

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

full bin strategy

A

makes all the bins as full as possible, logical and no algorithm

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

heuristic

A

efficient solution, but not always optimal

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

how do you carry out quick sort algorithm

A

1) first value in the list is the pivot, write down values in same order which are smaller and larger than pivot
2) repeat on each sublist

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