Question d’entretien chez Microsoft

Describe an algorithm that reverse a string.

Réponse à la question d'entretien

Utilisateur anonyme

2 janv. 2017

Starting iterations from first and last indexed element, swap array elements using temporary variable for values (or pointers or addresses - depends on realisation) until first index is greater or equals to last index, increasing start index and decreasing last index at the end of each loop iteration