Описание задачи: https://github.com/CrazySquirrel/Outt...
Sort by Row: O(n) | O(n) - https://github.com/CrazySquirrel/Outt...
Visit by Row: O(n) | O(n) - https://github.com/CrazySquirrel/Outt...
Sort by Row (Optimized): O(n) | O(n) - https://github.com/CrazySquirrel/Outt...