Misc Flashcards

1
Q

Online vs offline algo definition

A

an online algorithm[1] is one that can process its input piece-by-piece in a serial fashion, i.e., in the order that the input is fed to the algorithm, without having the entire input available from the start.

In contrast, an offline algorithm is given the whole problem data from the beginning and is required to output an answer which solves the problem at hand

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

Performance of online vs offline algorithms

A

For many problems, online algorithms cannot match the performance of offline algorithms

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

What are competitive online algorithms?

A

If the ratio between the performance of an online algorithm and an optimal offline algorithm is bounded, the online algorithm is called competitive.[1]

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

Random access

A

more precisely and more generally called direct access) is the ability to access an arbitrary element of a sequence in equal time or any datum from a population of addressable elements roughly as easily and efficiently as any other, no matter how many elements may be in the set. In computer science it is typically contrasted to sequential access which requires data to be retrieved in the order it was stored.

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

NALSD

A

Non abstract large system design

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

Cons

A

is a fundamental function in most dialects of the Lisp programming language. cons constructs memory objects which hold two values or pointers to values.

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

Big O vs little o notation

A

think of big-O meaning “grows no faster than” (i.e. grows at the same rate or slower) and little-o meaning “grows strictly slower than”

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

Cache oblivious algorithm

A

an algorithm designed to take advantage of a CPU cache without having the size of the cache (or the length of the cache lines, etc.)

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

inplacement/in-place-algorithm

A

an algorithm which transforms input using no auxiliary data structure. However, a small amount of extra storage space is allowed for auxiliary variables. The input is usually overwritten by the output as the algorithm executes. An in-place algorithm updates its input sequence only through replacement or swapping of elements. An algorithm which is not in-place is sometimes called not-in-place or out-of-place.

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

Are sets unique

A

Yes

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

In core vs out of core

A

In core = all data can be held in RAM

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

Out of core algorithms are also called

A

External memory algorithms

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

Is dynamic programming simply recursion plus caching?

A

Essentially. But more specifically it is the concept of dividing a problem into sub problems, and any time one of those sub problems is solved, caching the solution such that in the future if the sub problem is called, it takes O(1) to solve the problem

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