Amdocs Interview Question

asked some normal puzzles