Pregunta de entrevista de MDLand International

medium leet code algorithm question