You are viewing a single comment's thread. Return to all comments →
javascript solution, only 2 line of code. const I change to let to make the variable mutable
function main() { const n = parseInt(readLine().trim(), 10); let arr = readLine().replace(/\s+$/g, '').split(' ').map(arrTemp => parseInt(arrTemp, 10)); arr = arr.reverse(); console.log(arr.join(' ')); }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 7: Arrays
You are viewing a single comment's thread. Return to all comments →
javascript solution, only 2 line of code. const I change to let to make the variable mutable