Skip to main content
added 88 characters in body
Source Link
Jordan
  • 11.3k
  • 1
  • 33
  • 55

Ruby, 4747 42 bytes

-5 bytes thanks to Steffan

Inspired by pxeger's Zsh answer.

->a{w=-1w=0
a.map{" "*(_1<?@?(1+ww-=1):(~-w+=1))+_1}}

Attempt This Online!Attempt This Online!

Ruby, 47 bytes

Inspired by pxeger's Zsh answer.

->a{w=-1
a.map{" "*(_1<?@?(1+w-=1):(w+=1))+_1}}

Attempt This Online!

Ruby, 47 42 bytes

-5 bytes thanks to Steffan

Inspired by pxeger's Zsh answer.

->a{w=0
a.map{" "*(_1<?@?w-=1:~-w+=1)+_1}}

Attempt This Online!

Source Link
Jordan
  • 11.3k
  • 1
  • 33
  • 55

Ruby, 47 bytes

Inspired by pxeger's Zsh answer.

->a{w=-1
a.map{" "*(_1<?@?(1+w-=1):(w+=1))+_1}}

Attempt This Online!