Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

2 of 5
saved 4 bytes
Arnauld
  • 205.5k
  • 21
  • 187
  • 670

JavaScript (ES6), 128 bytes

Non-centered crates are shifted to the right.

a=>(w=eval(a.join`+`),g=x=>(q=W-a[y/w|0]*w)?`* 
`[--x?-~y%w>1&(X=q/2+x)%w>=2|X<q|X>=W:++y&&2]+g(x||W):'')(W=[...a].pop(y=0)*w+1)

Try it online!

Arnauld
  • 205.5k
  • 21
  • 187
  • 670

AltStyle によって変換されたページ (->オリジナル) /