this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cleanup

+1 -5
+1 -5
2023/day10/part1.ts
··· 1 1 export function answer(input: string): number { 2 2 const m = input.split("\n").map((l) => l.split("")); 3 - console.log(`map: ${m[0].length}x${m.length}`); 4 - 5 3 const mainLoop = findMainLoop(m); 6 - 7 4 return Math.floor(mainLoop.length / 2); 8 5 } 9 6 ··· 30 27 .fill(null) 31 28 .map((_, i) => [start, move(start, dirs[i])]); 32 29 33 - for (const [i, pathStart] of paths.entries()) { 30 + for (const pathStart of paths) { 34 31 const path = followPath(m, pathStart); 35 - console.log(i, path); 36 32 if (isLoop(m, path)) return path; 37 33 } 38 34 throw "did not find main loop";