arrow_back Back to Challenges

#112 Path Sum

Easy Acceptance 0%
description

Problem Description

Given the root of a binary tree and an integer `targetSum`, return `true` if the tree has a root-to-leaf path such that adding up all the values along the path equals `targetSum`.

checklist Constraints

See problem description for detailed constraints.

science Examples

Case #1

In: # See problem description for input format
Out: # Expected output

Mastery Tags

Recursion Trees

Hiring Companies

Bloomberg Google
code

Integrated IDE

code_blocks
Coding
psychology
Aptitude