Cognizant interview question

questions on stacks and queus