You are viewing a single comment's thread. Return to all comments →
My js answer :
function processData(input) {
const lines = input.split('\n') const t = parseInt(lines[0]) for(let i = 1; i<= t; i++){ let even = ""; let odd = ""; for(let k = 0; k < lines[i].length ; k++){ if(k % 2 === 0){ even += lines[i][k]; } if(k % 2 === 1){ odd += lines[i][k]; } } console.log(even + " " + odd); }
}
Seems like cookies are disabled on this browser, please enable them to open this website
Day 6: Let's Review
You are viewing a single comment's thread. Return to all comments →
My js answer :
}