I’m aware that linked lists, sets and arrays can be used to create stacks by themselves. The theory behind it is this
linked-list
: In some languages, a linked-list is substitutable for an array. Stacks are First In First Out operations.
array
: The push
and pop
methods invoke a stack like behavior.
set
: A set is exactly the same as an array, except it does not feature duplicate elements.
I’m struggling to find a way that a tree can be used to create a stack