diff --git a/Reverse a Stack.cpp b/Reverse a Stack.cpp new file mode 100644 index 0000000..bf28b0b --- /dev/null +++ b/Reverse a Stack.cpp @@ -0,0 +1,12 @@ +void reverseStack(stack &input, stack &extra) { + int x; + while(!input.empty()) + { + x=input.top(); + extra.push(x); + input.pop(); + + } + input=extra; + //Write your code here +}