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.
Explain about the Huffman algorithm.
Explain about a B+ tree and its uses.
What are the differences between singly-linked doubly-linked and circularly-linked lists?
What is win-win spiral model?
What are the dvantages of single linked list over doubly linked list?
What is minimum number of queues required to implementing the priority queue?
Describe the term iterative algorithm?
Explain the term stack operation. Also write some of its operations.
What are the different between quick and merge sort algorithms?
Explain about the priority queue?
18,76,764
1954618 Asked
3,689
Active Tutors
1414028
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!