Domanda di colloquio di Smarkets

Reverse an array.

Risposta di colloquio

Anonimo

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.