Frage im Vorstellungsgespräch bei Yandex

Reverse array of elements without using additional memory.

Antwort im Vorstellungsgespräch

Anonym

5. Sept. 2017

Brute force solution with swap will take O(1) additional memory, so I wrote my own swap function without additional memory using simple arithmetic.