Frage im Vorstellungsgespräch bei Qoria

Reverse an array without using helper packages (sudo code or language of choice) and avoid creating a new array

Antwort im Vorstellungsgespräch

Anonym

16. Okt. 2024

for(int i=0, i < (array.lenght / 2), i++){ int temp = array[i.length - 1 - i] array[i.length - 1 - i] = array[i] array[i] = temp }