Samsung Electronics interview question

Build a stack component using a simple memory component