Sollicitatievraag bij Microsoft

Describe an algorithm that reverse a string.

Antwoord op sollicitatievraag

Anoniem

2 jan 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