Problem:
Given a binary tree and an integer k
, return whether there exists a root-to-leaf path that sums up to k
.
Approach:
Since this is the first problem on this blog, let’s go step-by-step, and work through the solution. This problem is categorized as “easy”, and hence the solution shouldn’t be more than 10–20 lines of code.