Question: Assume that we have an efficient implementation of a stack based on a singly linked list (there are references to head and tail stored in

Assume that we have an efficient implementation of a stack based on a singly linked list (there are references to head and tail stored in the data fields in the class implementation). Where should the push method place the node with a new value? at the head (the new first node) after all other entries that are smaller than the new entry after all other entries that are sheater than the new entry at the tail (the new last node) either at the head or tail, it does not really matter
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
