gvwilson / sdxpy

Software Design by Example: a tool-based introduction with Python
https://third-bit.com/sdxpy/
Other
280 stars 49 forks source link

Figure 1.2 of complexity doesn't count interactions uniformly #275

Open tim-schilling opened 1 month ago

tim-schilling commented 1 month ago

The first and third graphics in the figure count each individual line as an interaction. The second graphic counts the arrows as the interactions. There are only 15 lines in the second graphic, but the description states there are 30 interactions.

This is probably fine, but there's an example exercise that asks you two define the Big O notation for the complexity growth. The inconsistency in how an interaction is defined makes that very challenging.

Figure I'm referring to: https://github.com/gvwilson/sdxpy/blob/main/src/intro/complexity.svg