Amazon Interview Question

form a stack using a linked list