Pregunta de entrevista de Jobsity

Classic algorithmic problems (easy to medium)