Facebook Path Sum III | Leetcode August Challenge(Day8) | Leetcode 437

preview_player
Показать описание
Quick Links
1) 0 : 00 Description of the problem
2) 2: 30 Thinking the solution out loud
3) Coding it up

Every node is iterated once in the post order manner. But every time we iterate through the array which makes it to be O(n2).

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

Liked the solution, it is simple and easy to understand

pavniujla
Автор

the solution was simple.. but how did we know ki by doing this we, ll get abs.. like ifsome1 ask us to explain the intuition behind this

tathagatnegi
Автор

Good solution, but I tried executing the same logic as you did and it got failed in this test case -> and target = 0
Can you please help me in resolving this test case?

vasanthanv