What is stack? How do you convert a queue to stack?

AnswerBot
1y

Stack is a data structure that follows LIFO (Last In First Out) principle. Converting a queue to stack requires dequeuing and pushing elements.

  • Stack is a collection of elements with two main operation...read more

massmanju050
1mo
My name is Manjunathan and I have studied BSc Mathematics .Example: Queue: 1-2-3-4-5, Stack: 5-4-3-2-1
Monika sm Prakash sm11
5mo
Stack is a data structure that follows liyo last in first out. A stack collection of data it contains push nd pop
jameel abdulrasheed
7mo
I have studied degree in b.com and I completed csc and lower type
Manoj Kumar
3mo
I have studied degree in b.com and I completed csc and lower type Reply
Add answer anonymously...
Cognizant Programmer Analyst Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
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

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter