Discuss how to apply queue using stack
Discuss how to apply queue using stack?
Expert
A queue can be applied by using two stacks:-
• 1. An element is inserted in queue by pushing it in stack 1 • 2. An element is extracted from queue by popping it from stack 2 • 3. If stack 2 is empty then all elements currently in stack 1 is transferred to stack 2 however in the reverse order • 4. If the stack 2 is not empty just pop value from stack 2.
Illustrate the term algorithm. Write down some of the properties of an algorithm?
Explain about the process management of operating system.
Give brief description of the term Quick Sort algorithm?
What are the applications in which stacks are used?
Briefly describe the term sequential search? And also write down the average number of comparisons in a sequential search?
Explain the disadvantages of the array implementations of linked list?
Illustrates the disadvantages of circular linked list over linear linked list?
Define the two-dimensional array.
What is the way to implement of traversal of a binary tree?
Briefly describe the term queue operation?
18,76,764
1931951 Asked
3,689
Active Tutors
1433213
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!