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.
Define when we should use a linked list instead of an array.
Write down in brief the working process of Merge Sort?
Give brief description of the term Quick Sort algorithm?
What is meant by the double linked list?
Explain an Array is an Ivalue or not.
Define software engineering?
What do you mean by sequential search? Find out the average number of comparisons in the sequential search?
What is an Operating System?
Define the two-dimensional array.
What is the dissimilarity between NULL and VOID pointers?
18,76,764
1943858 Asked
3,689
Active Tutors
1453832
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!