Cognizant interview question

Time complexity,Data Structure