Implementation of queue using stack
Describe the process how to implement the queue by using stack.
Expert
The queue can be implemented by using two stacks as:
a) The element is inserted in the queue by pushing it into the stack 1.
b) Element is extracted from the queue by popping it from the stack 2.
c) If the stack 2 is empty then all the elements presently in stack 1 are transferred to stack 2 however in the reverse order.
d) If the stack 2 is not empty simply pop the value from the stack 2.
Describe the terms Base case, Binding Time, Recursive case, Run-Time Stack and Tail Recursion.
Define cohension and coupling?
How is this possible to insert different type of elements within a stack?
When should we use Space in linked list instead of an array or vice versa?
Write down the various types of matrix operations?
Write down the differentiation between a stack and a Queue?
By using a declaration statement how is memory reserved?
Explain about the direct call to ISR by an interrupting source.
Give a brief description of the term Merge Sort?
What do you mean by Huffman algorithm?
18,76,764
1923539 Asked
3,689
Active Tutors
1439179
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!