Skip to content

Commit

Permalink
Update code style for House Robber
Browse files Browse the repository at this point in the history
  • Loading branch information
soapyigu committed Apr 13, 2017
1 parent 10ca4c9 commit a83215b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DP/HouseRobber.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class HouseRobber {
var curt = 0, prev = 0, res = 0

for num in nums {
res = max(res, prev + num)
res = max(cur, prev + num)
(curt, prev) = (res, curt)
}

Expand Down

0 comments on commit a83215b

Please sign in to comment.