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.
Write down in brief the working process of Quick sort?
Describe the terms Base case, Binding Time, Recursive case, Run-Time Stack and Tail Recursion.
What are the differences between Base case and Run-Time Stack?
Minimum number of queues required implements the priority queue?
Illustrates the recursive algorithm?
Briefly describe the term sequential search? And also write down the average number of comparisons in a sequential search?
Explain about a B+ tree and its uses.
What is the way to implement of deletion from a binary tree?
Whether Linked List is linear or Non-linear data structure?
Define when we should use a linked list instead of an array.
18,76,764
1926524 Asked
3,689
Active Tutors
1457441
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!