Pregunta de entrevista de SEP

cracker barrel game solving question.