2 ms·
Nothing. For complex algorithms, I prefer to think in invariants: "this condition should hold here, so this variable must be that". I guess, for me the only ex
by cyberax 2y ago
Nothing. For complex algorithms, I prefer to think in invariants: "this condition should hold here, so this variable must be that".
I guess, for me the only exception is the dynamic programming algorithms. I re-discovered the wave algorithm (aka Dijkstra's algorithm) for solving mazes while writing in BASIC at school, and since then, I tend to reformulate any dynamic programming task as a path search in a maze.
- deleted 2y ago[deleted]