Pregunta de entrevista de Stash

A Leetcode Hard, won't give the specific question