How is it possible to insert different type of elements in
stack?

Answer Posted / poornakala

you ca implement stack with union datatype... u may think
of structures.. but struct use storin of all values and mem
allocated for all in each.. but in union only one at a
time... this is right i think...

Is This Answer Correct ?    61 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default capacity of hashmap?

500


How do you sort large data?

657


What is a treeset?

576


What is linked list in data structure?

632


What is difference between concurrenthashmap and hashtable?

512






What is dequeue operation?

552


Define a linear data structure.

594


How does sort function work?

580


Which is more efficient merge sort vs quicksort?

565


Define heap order property?

623


What is the need of sorting?

593


What is unhashable type list?

564


Does arraylist shrink?

561


What is queue example?

570


What happens if we try to insert duplicate key in hashmap?

492