构建类层次结构的某些方法是否比其他方法更有效?有没有办法测量这个?设计模式如何影响计算复杂性?我只是在想这个错误吗?只是好奇。
问问题
128 次
2 回答
2
面向对象编程与算法(以及渐近运行时)无关,它只是一种流行的结构化程序的方式,试图使它们更加灵活和抗改变。
设计模式也是如此。
于 2011-11-22T18:34:05.867 回答
0
If you don't introduce silly bugs in your OO code, asymptotic complexity of any algorithm won't change. Constant multiplier in formula for memory consumption/running time of your particular algorithm can change, but not it's asymptotic behavior. But this change , usually, is practically unimportant.
于 2011-11-22T18:47:45.113 回答