AnswerBot
1y
To get the mth element of a stack with n elements, without using another stack.
Create a temporary variable to store the mth element
Pop the top (n-m) elements from the stack and discard them
Pop and sto...read more
Help your peers!
Add answer anonymously...
Top Ameyo SDE interview questions & answers
Popular interview questions of SDE
Top HR questions asked in Ameyo SDE
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app