Skip to main content
1 of 2
Erik the Outgolfer
  • 40.6k
  • 5
  • 45
  • 122

APL (Dyalog), 27 bytes

((3 3⍴⊢,1↓⊖)>∘3 5 1 7,2∘|)¨

Try it online!

The output format is a little bit weird: this function returns an array containing two shape-3,3 arrays each containing 0s and 1s.

Erik the Outgolfer
  • 40.6k
  • 5
  • 45
  • 122