GoLang Solution For LeetCode Problem: House Robber II
Solving House Robber II in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Input: [2,3,2] Output: 3 Explanation: You cannot rob house 1 (money = 2) and then rob house 3 (money = 2), because they are adjacent houses.
Input: [1,2,3,1] Output: 4 Explanation: Rob house 1 (money = 1) and then rob house 3 (money = 3). Total amount you can rob = 1 + 3 = 4.
See the full details of the problem House Robber II at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go