path sum

sum-=root.val And then check leaf val equal to 0 or not.