Skip to content

Instantly share code, notes, and snippets.

@0racle
Last active February 6, 2023 22:24
Show Gist options
  • Save 0racle/d603fb7f8223de6a2ca750d274a13ede to your computer and use it in GitHub Desktop.
Save 0racle/d603fb7f8223de6a2ca750d274a13ede to your computer and use it in GitHub Desktop.
Aoc 2019 day 3 in J
Parse =. +/\@;@(<@(".@}. # 0j1 ^ 'RDLU' i. {.);._2)@,&','
w =. Parse;._2 fread 'input'
echo <./ +/@:|@+. isects =. (e. # [)/ w
echo <./ +/ >: i.&isects"1 w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment