Is it probable to insert dissimilar type of element in stack

Is it probable to insert dissimilar type of elements in stack?

E

Expert

Verified

Different elements can be inserted in stack. This is probable by implementing union / structure data type. It is efficient to employ union rather than structure, as only one item’s memory is employed at time.

   Related Questions in Data Structure & Algorithms

©TutorsGlobe All rights reserved 2022-2023.