Comment on Swapping two blocks of memory inside a larger block, in constant memoryComments−throwawayk7h8moThis should also be possible with [XOR swap](https://en.wikipedia.org/wiki/XOR_swap_algorithm), though you need to do three passes.
Comments
This should also be possible with [XOR swap](https://en.wikipedia.org/wiki/XOR_swap_algorithm), though you need to do three passes.