Pregunta de entrevista de Rakuten

Two sum problem and substring problem