Pregunta de entrevista de Maistorage

Algorithm question and some firmware