Amazon interview question

form a stack using a linked list