2 ms·
Oftentimes, it is easy to overlook whether that real-world overhead affects the asymptotic performance of your algorithm in either an ideal sense or a pragmatic
by KaeseEs 15y ago
Oftentimes, it is easy to overlook whether that real-world overhead affects the asymptotic performance of your algorithm in either an ideal sense or a pragmatic one. If memory allocation were free or memory were infinite, true constant time rather than amortized constant time push back on dynamic arays/vectors would be possible, etc.
Also, initialization often affects correctness, so it's much less frequently skipped even in pseudocode for an algorithm.