searching and Big-O Flashcards

1
Q

a quality solution is:

A

correct
efficient
elegant
usable

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

correctness

A

does it solve the problem it’s supposed to solve

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

efficiency

A

is it as fast as it can be, does it take up the strictly necessary amounts of storage/memory

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

elegance

A

is it simple yet effective

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

usability

A

does it provide a satisfactory way for the target audience to use it

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

space-time trade-off

A

it describes an inverse proportionality between space-complexity and time-complexity

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

time and correctness trade-off

A

if a programmer is in a rush to write a solution (because of deadlines for example), the solution is more likely to have bugs

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

trade-off between cleverness and comprehensibility

A

sometimes, the most efficient solution is incredibly counter-intuitive; while efficiency is always welcome, counter-intuitive code can result in misunderstandings from co-developers

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

linear search

A

a search algorithm that starts from the beginning of a list, and checks each element until the search key is found or the end of the list is reached

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

runtime

A

the time the algorithm takes to execute

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

binary search

A

a faster algorithm for searching a list if the list’s elements are sorted and directly accessible

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

Big O notation

A

a mathematical way of describing how a function (running time of an algorithm) generally behaves in relation to the input size

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

worst-case runtime

A

the runtime complexity for an input that results in the longest execution

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