Frage im Vorstellungsgespräch bei Unique School Solutions

Solve DSA question from leetcode link given