I would like to start with details on what it means to “sort vertically and horizontally”
, , , , , . O (log C + log R), C R, , . , O (log (C * R)), O (log N), N - . , 1D .
, :
1 2 3 4 5 6 7 8 9
2 3 4 5 6 7 8 9 10
3 4 5 6 7 8 9 10 11
:
- . , . , :
- . , . , ;
- , , , , , ;
.