Skip to content

Commit 77b7fcc

Browse files
authored
Merge pull request #291 from maligh/patch-2
Update PathSum.swift
2 parents dfe2b8a + e713133 commit 77b7fcc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tree/PathSum.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
class PathSum {
20-
func hasPathSum(root: TreeNode?, _ sum: Int) -> Bool {
20+
func hasPathSum(_ root: TreeNode?, _ sum: Int) -> Bool {
2121
guard let root = root else {
2222
return false
2323
}
@@ -27,4 +27,4 @@ class PathSum {
2727

2828
return hasPathSum(root.left, sum - root.val) || hasPathSum(root.right, sum - root.val)
2929
}
30-
}
30+
}

0 commit comments

Comments
 (0)