Housejoy interview question

Just prepare for D.S and algorithm.Some basic puzzles are also asked.