3 added 156 characters in body
source | link

APL (Dyalog Classic), 18 bytes

⎕a[↑⊢∘⌽\(⊂>⊢⌊⌽)⍳⎕]

Try it online!

outputs AB instead of *#

evaluated input n

⍳⎕ the integers below n:vector 0 1 ... n-1

⊢⌊⌽ min () between themselves () and their reverse () - see trains

⊂>⊢⌊⌽ where is the vector as a whole () less than each of its ⊢⌊⌽ - return a vector of boolean (0/1) vectors

⊢∘⌽\ reverse every other vector

mix into a matrix

⎕a the uppercase English alphabet, 'AB...Z'

⎕a[ ] replace 0 10 1 with A'A' B'B'

APL (Dyalog Classic), 18 bytes

⎕a[↑⊢∘⌽\(⊂>⊢⌊⌽)⍳⎕]

Try it online!

outputs AB instead of *#

evaluated input n

the integers below n: 0 1 ... n-1

⊢⌊⌽ min () between themselves () and their reverse ()

⊂>⊢⌊⌽ where is the vector as a whole () less than each of its ⊢⌊⌽ - return a vector of boolean (0/1) vectors

⊢∘⌽\ reverse every other vector

mix into a matrix

⎕a[ ] replace 0 1 with A B

APL (Dyalog Classic), 18 bytes

⎕a[↑⊢∘⌽\(⊂>⊢⌊⌽)⍳⎕]

Try it online!

outputs AB instead of *#

evaluated input n

⍳⎕ the vector 0 1 ... n-1

⊢⌊⌽ min () between themselves () and their reverse () - see trains

⊂>⊢⌊⌽ where is the vector as a whole () less than each of its ⊢⌊⌽ - return a vector of boolean (0/1) vectors

⊢∘⌽\ reverse every other vector

mix into a matrix

⎕a the uppercase English alphabet, 'AB...Z'

⎕a[ ] replace 0 1 with 'A' 'B'

2 added 464 characters in body
source | link

APL (Dyalog Classic), 18 bytes

⎕a[↑⊢∘⌽\(⊂>⊢⌊⌽)⍳⎕]

Try it online!

outputs AB instead of *#

evaluated input n

the integers below n: 0 1 ... n-1

⊢⌊⌽ min () between themselves () and their reverse ()

⊂>⊢⌊⌽ where is the vector as a whole () less than each of its ⊢⌊⌽ - return a vector of boolean (0/1) vectors

⊢∘⌽\ reverse every other vector

mix into a matrix

⎕a[ ] replace 0 1 with A B

APL (Dyalog Classic), 18 bytes

⎕a[↑⊢∘⌽\(⊂>⊢⌊⌽)⍳⎕]

Try it online!

APL (Dyalog Classic), 18 bytes

⎕a[↑⊢∘⌽\(⊂>⊢⌊⌽)⍳⎕]

Try it online!

outputs AB instead of *#

evaluated input n

the integers below n: 0 1 ... n-1

⊢⌊⌽ min () between themselves () and their reverse ()

⊂>⊢⌊⌽ where is the vector as a whole () less than each of its ⊢⌊⌽ - return a vector of boolean (0/1) vectors

⊢∘⌽\ reverse every other vector

mix into a matrix

⎕a[ ] replace 0 1 with A B

1
source | link

APL (Dyalog Classic), 18 bytes

⎕a[↑⊢∘⌽\(⊂>⊢⌊⌽)⍳⎕]

Try it online!