hi @vaporeon_ wanna see Advent of Clod code so golfed that its not even a spoiler?
advent of clod "spoiler"
console.log(
"solution:",
Deno.readTextFileSync("day-03-q1-input.txt").split("\r\n").reduce((a, s) => {
for (var d = new Array(12).fill(-1), m = { "-1": -1 }, i = 0; i < 12; ++i) for (let j = m[i - 1] + 1; j < s.length - 11 + i; ++j) if (+s[j] > d[i]) d[i] = +s[m[i] = j];
return a + d.reduce((sum, n, i, a) => sum + 10 ** (a.length - 1 - i) * n, 0);
}, 0));
despite what you may suspect from the double for loop, this runs in O(n) time
@wallhackio @vaporeon_ well i sure do