Cognizant interview question

First-round was creating a stack using a LinkedList and with TDD