Grab interview question

basic datastrutures and algos,