Amdocs Interview Question

Stack implementation