Domanda di colloquio di Stash

A Leetcode Hard, won't give the specific question