Stack

Stack it :3

IN

add 1
add 3
add 3
add 7
pop
pop
add 9
pop
pop

OUT

7
3
9
3

IN

add 7
add 7
pop
pop
add 7
pop

OUT

7
7
7

IN

add 1
add 2
add 3
add 4
pop
pop
pop
pop

OUT

4
3
2
1


Leave a comment

Parsed as Markdown

Login to leave a comment