Domanda di colloquio di Microsoft

Describe an algorithm that reverse a string.

Risposta di colloquio

Anonimo

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