Skip to content

Commit 50f7735

Browse files
author
Yi Gu
committed
[Tree] refactor solution to Path Sum II
1 parent 53c5275 commit 50f7735

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Tree/PathSumII.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ class PathSumII {
3636

3737
if root.left == nil && root.right == nil && root.val == sum {
3838
list.append(root.val)
39-
let dupList = list
40-
res.append(dupList)
39+
res.append(list)
4140
return
4241
}
4342

0 commit comments

Comments
 (0)