Given a number n followed by a sequence of n characters, print them in the reverse order.
Put the characters in a stack and then pop, and print them one by one.
Given a number n followed by a sequence of n characters, print them in the reverse order.
Put the characters in a stack and then pop, and print them one by one.
Sample Input 1:
5
s
t
a
c
kSample Output 1:
k
c
a
t
sCreate a free account to access the full topic