LeetCode 112 | Path Sum | Solution Explained | Java + Whiteboard

preview_player
Показать описание
Running Time: O(N)
Space Complexity: O(N)

Always be pluggin:
Рекомендации по теме
Комментарии
Автор

This solution was the most straight forward and clean approach, love it and the use of the || operator in the return.

sanctusfides
Автор

Why should sum be equal to zero if its a root node??

karthikprabhu_career