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.
Provide a brief description of the term heap?
What is meant by the precision?
Define the term heap in brief.
What does isEmpty() member technique determines?
List out the merits and demerits of the term rehashing?
Explain how the Doubly Linked List associated with the Circular Linked List?
Explain whether the fact table is in normal form or not?
Write down in brief the working process of Merge Sort?
Describes the uses of Tree Database?
Explain about linked list?
18,76,764
1950424 Asked
3,689
Active Tutors
1448709
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!