Question d’entretien chez Accenture

They asked me to explain how to reverse an array without using any extra space.

Réponse à la question d'entretien

Utilisateur anonyme

15 sept. 2025

I explained the two-pointer approach, where one pointer starts at the beginning and the other at the end of the array. I swap elements until both pointers meet in the middle, which reverses the array in place with O(1) extra space and O(n) time complexity.