Skip to content

Instantly share code, notes, and snippets.

@ElectricCoffee
Last active December 7, 2022 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ElectricCoffee/6c24ddf44a56473b726050b9e0576ebf to your computer and use it in GitHub Desktop.
Save ElectricCoffee/6c24ddf44a56473b726050b9e0576ebf to your computer and use it in GitHub Desktop.
My solution for the Advent of Code day 5 problem in APL
Solution ← {¯1+⍺+⍺⍳⍨≢¨⍺ ∪/⍵}
⍝ Or with ⎕io ← 0:
Solution ← {⍺+⍺⍳⍨≢¨⍺ ∪/⍵}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment