A stack is a first-in last-out data structure. By using the stack, a device changes the
order of data received from the right side and sends it to the left side, as shown in the
figure below. There are three types of operations available on the device, as described
below.