We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dfe2b8a + e713133 commit 77b7fccCopy full SHA for 77b7fcc
Tree/PathSum.swift
@@ -17,7 +17,7 @@
17
*/
18
19
class PathSum {
20
- func hasPathSum(root: TreeNode?, _ sum: Int) -> Bool {
+ func hasPathSum(_ root: TreeNode?, _ sum: Int) -> Bool {
21
guard let root = root else {
22
return false
23
}
@@ -27,4 +27,4 @@ class PathSum {
27
28
return hasPathSum(root.left, sum - root.val) || hasPathSum(root.right, sum - root.val)
29
30
-}
+}
0 commit comments