Intuit interview question

Leet code dsa. Not sure