Domanda di colloquio di Qoria

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

Risposta di colloquio

Anonimo

16 ott 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 }