Cognizant interview question

Datastructure Program