mirror of
https://github.com/seigler/advent-of-code-browser-console
synced 2025-07-26 00:06:10 +00:00
Day 15
This commit is contained in:
parent
ba2a91c553
commit
8fae5d618d
1 changed files with 1 additions and 0 deletions
1
day15.js
Normal file
1
day15.js
Normal file
|
@ -0,0 +1 @@
|
|||
I=[9,12,1,4,17,0,18],F=a=>{L=new Map(I.slice(0,-1).map((a,b)=>[a,b]));let b=I[I.length-1];for(let c=I.length;c<a;c++)n=c-1-L.get(b)||0,L.set(b,c-1),b=n;return b},[F(2020),F(3e7)];
|
Loading…
Add table
Add a link
Reference in a new issue