242 B
Executable File
242 B
Executable File
- 觀察矩陣對角線模式
- (0,0) -> 1 -> i+j = 0
- (1, 0), (0, 1) -> 2 -> i+j = 1
- (2, 0), (1, 1), (0, 2) -> 3 -> i+j = 2
- how to deal with diagonal sorting?
- while (i+j) % 2 == 1
- while (i+j) % 2 == 0 reversed