How is it possible to insert different type of elements in
stack?
Answer Posted / sudipto ghosh
yes it is possible to insert different types of element in a
stack.
insted of defining the member as int or float or so on. we
will define each element as a union which will be consisting
of all types of data type and only one can be used at a
time. in order to determine which type of element is being
pushed or poped we will define a flag with in union which
keeps the track of data type being used.
Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
Why it is said that searching a node in a binary search tree is efficient than that of a simple binary tree?
What is the order of selection sort?
What is the Difference between sax and dom parser?
Is hashmap ordered?
What is Jagged Arrays?
What is int data type?
Is learning data structures necessary?
What is the heap in data structures?
How will you represent a linked list in a graphical view?
What is a hashset?
How do you find the number of comparisons in bubble sort?
Explain the priority queue?
What is push and pop in stack?
When would you use a tuple?
What are the non linear data structure?