Pregunta de entrevista de NearGroup

Some basic question from iOS development and then some puzzles problem then a machine test.