Search
⌘K

Leetcode 113. Path Sum II

Find all root-to-leaf paths in a binary tree whose node values sum to targetSum, returning each path as a list of values. This is solved with DFS/backtracking that accumulates the running sum (note values may be negative and tree size ≤ 5000).

Asked at:

Amazon

Amazon

Meta

Microsoft

Microsoft


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early May, 2026

Amazon

Amazon

Intern

Late October, 2025

Microsoft

Microsoft

Mid-level

Early May, 2025

Meta

Mid-level

Your account is free and you can post anonymously if you choose.