import fs from 'node:fs'; const listOne: number[] = []; const listTwo: number[] = []; const map: Map = new Map(); export default function runner(input: string) { fs.readFile(`./${input}`, 'utf8', (err, data) => { if (err) throw err; data.split('\n').forEach(line => { const spLine = line.split(' '); if (!spLine[0] || !spLine[1]) throw new Error() listOne.push(parseInt(spLine[0])) listTwo.push(parseInt(spLine[1])) }) for(let i = 0; i