I am not able to understand about the parameters inside the reverseStack function .
void reverseStack(stack< int > &input, stack < int > &extra) only this line
Reverse a stack problem
why are we using & in it
how pass by reference is working in this solution?
we are passing stack as refrence ie if we dont use & then a copy of stack will be created and all operations will be done on that copied stack but becuase we want to make changes on original stack we are passing it as reference(passing same stack instead of copy)
ohk thanks for your help
