New answers tagged

5

APL (Dyalog Unicode), 59 57 bytesSBCS {v⍳+\v[⍺],↓⍉↑(|⍴¨×)⊃⍵⍺-.⊃⊂v←9 11∘○¨+\0,0j1*{⍵/⍨⌈⍵÷2}⍳⍺⌈⍵} Try it online! -2 bytes thanks to @ngn. Anonymous function that accepts two endpoints as left and right arguments. Ungolfed & how it works The queen moves diagonally first, so it is sufficient to pre-compute the coordinates of each number up to max(start,...


Top 50 recent answers are included