Pregunta de entrevista de dubdub

Algorithms question and design question