How is different type of element insert in a stack

How is different type of element insert in a stack? Is it possible?

E

Expert

Verified

Different type of elements can be inserted within a stack. It is possible by implementing union or structure data type. This is efficient to employ union quite than structure, that only one item’s memory is utilized at a time.

   Related Questions in Data Structure & Algorithms

©TutorsGlobe All rights reserved 2022-2023.