You are viewing a single comment's thread. Return to all comments →
My answer with Typescrit,
Cause no starting code, i was do it for my self
Questiom sample explain is wrong, it confusing me for a while.
function main() { const ws: WriteStream = createWriteStream(process.env['OUTPUT_PATH']); const t: number = parseInt(readLine().trim(), 10); for (let i = 0; i < t; i++) { const n: number = parseInt(readLine().trim(), 10); const ns: number[] = [] for (let j = 0; j < n; j++) ns.push(parseInt(readLine().trim(), 10)) const m: number = parseInt(readLine().trim(), 10); const ms: number[] = [] for (let j = 0; j < m; j++) ms.push(parseInt(readLine().trim(), 10)) ws.write([...ns, ...ms].sort((a, b) => a - b).join(' ') + '\n'); } ws.end(); }
Seems like cookies are disabled on this browser, please enable them to open this website
Merge two sorted linked lists
You are viewing a single comment's thread. Return to all comments →
My answer with Typescrit,
Cause no starting code, i was do it for my self
Questiom sample explain is wrong, it confusing me for a while.