Sort the values in-place based on the connectors in the network.
(self, values)
| 63 | last_level[wire1] = wire2 |
| 64 | |
| 65 | def sort(self, values): |
| 66 | """Sort the values in-place based on the connectors in the network.""" |
| 67 | for level in self: |
| 68 | for wire1, wire2 in level.items(): |
| 69 | if values[wire1] > values[wire2]: |
| 70 | values[wire1], values[wire2] = values[wire2], values[wire1] |
| 71 | |
| 72 | def assess(self, cases=None): |
| 73 | """Try to sort the **cases** using the network, return the number of |
no outgoing calls
no test coverage detected