3 ms·
Even for power of two it's not correct, forget my statement about cycles.
by throwaput 10y ago
Even for power of two it's not correct, forget my statement about cycles.
- throwaput 10y agoYet I have only one idea - that we can permute the elements somehow (in a O(1) reversible way like a Gray code) so that the cycles would form something computable in O(n) time and O(1) space