XYZ (Turkey) Interview Question

how to implemented memory stack