employer cover photo
employer logo
employer logo

Rubicon Project

Désormais appelé Magnite

Est-ce votre entreprise ?

Question d’entretien chez Rubicon Project

reverse a character array

Réponse à la question d'entretien

Utilisateur anonyme

4 nov. 2017

made ouput array, started reading elements from the end of the input array, stored them one by one in the output array , thereby achieved reversed character array was asked to reduce space complexity got rid of the output array, defined a temporary variable, and started swapping first element by last, second by second last, thereby reduced the time and space complexity in half.