Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Path Sum (Easy 112)

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.

Solution:

Click here Do pre order traversal, by adding to total and compare total to sum. If sum matches up and current node has no leaves, return true.



Installation

Run make to run python and Swift files.