Skip to main content
Brain-Flask postdates this challenge by a few years
Source Link
user45941
user45941

Brain-Flak, 15 bytes (non-competing)

{({}<>)<>}<>

Try it online!

12 bytes of code, and +3 bytes for the -c flag, which enables input and output in ASCII.

Explanation:

#While the stack is not empty:
{

 #Push the top of the stack onto the alternate stack
 ({}<>)

 #Toggle back to the main stack
 <>

#endwhile
}

#Toggle to the alternate stack, implicitly display
<>

Brain-Flak, 15 bytes

{({}<>)<>}<>

Try it online!

12 bytes of code, and +3 bytes for the -c flag, which enables input and output in ASCII.

Explanation:

#While the stack is not empty:
{

 #Push the top of the stack onto the alternate stack
 ({}<>)

 #Toggle back to the main stack
 <>

#endwhile
}

#Toggle to the alternate stack, implicitly display
<>

Brain-Flak, 15 bytes (non-competing)

{({}<>)<>}<>

Try it online!

12 bytes of code, and +3 bytes for the -c flag, which enables input and output in ASCII.

Explanation:

#While the stack is not empty:
{

 #Push the top of the stack onto the alternate stack
 ({}<>)

 #Toggle back to the main stack
 <>

#endwhile
}

#Toggle to the alternate stack, implicitly display
<>
Source Link
DJMcMayhem
  • 59.6k
  • 17
  • 196
  • 348

Brain-Flak, 15 bytes

{({}<>)<>}<>

Try it online!

12 bytes of code, and +3 bytes for the -c flag, which enables input and output in ASCII.

Explanation:

#While the stack is not empty:
{

 #Push the top of the stack onto the alternate stack
 ({}<>)

 #Toggle back to the main stack
 <>

#endwhile
}

#Toggle to the alternate stack, implicitly display
<>