#15  linear data structures + algorithm analysis Flashcards

1
Q

purpose of an equals method

A

checks id two objects have to the same state (values in all fields)

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

getClass

A

gets the specific class

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

instanceOf

A

checks if something is in the same class or subclass

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

2 ways to check algorithm efficiency

A
  1. benchmarking

2. asymptotic analysis

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

benchmarking

A

code the algorithm and time how fast it runs

affected by hardware and inputs) (does not measure intrinsic efficiency

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

asymptotic analysis

A

mathematically analyze, express run time as a function of input size
(measures intrinsic efficiency) (hardware, program language have not impact)

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