Pregunta de entrevista de Filics

A screenshot of a leetcode algorithmic problem that you need to solve and code the answer for it.