Pregunta de entrevista de Samsung Electronics

algorithm/CS based problem