#15 linear data structures + algorithm analysis Flashcards
(6 cards)
1
Q
purpose of an equals method
A
checks id two objects have to the same state (values in all fields)
2
Q
getClass
A
gets the specific class
3
Q
instanceOf
A
checks if something is in the same class or subclass
4
Q
2 ways to check algorithm efficiency
A
- benchmarking
2. asymptotic analysis
5
Q
benchmarking
A
code the algorithm and time how fast it runs
affected by hardware and inputs) (does not measure intrinsic efficiency
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)