Frage im Vorstellungsgespräch bei Smarkets

Reverse an array.

Antwort im Vorstellungsgespräch

Anonym

19. Apr. 2018

Did it in O(n) without an additional data structure. Loop through half of the array and use a temp variable to swap values.