March 2020
Intermediate to advanced
328 pages
10h 1m
English
After enduring 17 different versions of water containers, you may be wondering what’s the best one, what’s the ultimate water container class? The answer is not simple. In some sense, any of those versions (except Novice) can be the best one, given the right circumstances. For example, Speed1 is the best if you absolutely need constant-time addWa ter and getAmount. Similarly, Memory4 is the best if you absolutely need to squeeze as many containers as possible in a given amount of memory. In both cases, those versions are optimal only if you don’t care about any other software quality, which is admittedly a very unrealistic assumption.
In fact, treating software qualities separately, as I’ve done ...