Simulation
Zig Zag
Matrix Traversal
Paint
- 对于实际操作, 直接覆写至状态数组即可, 无需关心边界条件(效果会立即生效)
e.g. 交接处方块 , 2 次写 1,
maps[i][j] = 1, 不用担心重复计数.
Revert
- Using 1 bit to simulate operation.
- When need to output, calculate bits up.
- Combined with dynamic programming problem.
Meet and Collision
追及碰撞问题: 将相遇/碰撞的两物体视作插肩而过即可.