4 ms·
Starting with the initial board and applying n-1 moves should be significantly slower than using immutable data structures. I don't have much experience in algo
by terminalcommand 9y ago
Starting with the initial board and applying n-1 moves should be significantly slower than using immutable data structures. I don't have much experience in algorithms but I think O(1) trumps O(N-1) :).
- wila 9y agoThe problem with graphics though is that some graphical operations are destructive so you can't just undo the operation. In order to undo without a redo list, you would have to keep a complete graphical representation of the image and each operation. With images the memory usage goes up very quickly in that case, copying large blocks of memory on each operation makes your image editing slow down too.