Question: Reverse a string [ Difficulty: Medium ] Given a string, reverse it using a stack and print it . Input Format String that has to
Reverse a string
Difficulty: Medium
Given a string, reverse it using a stack and print it
Input Format
String that has to be reversed.
Output Format
The reverse of the input string
Sample Input :
abcd
Sample Output :
dcba
Sample Input :
abcdef
Sample Output :
fedcba
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
