"""
Exercise 2: House Robber II (LeetCode 213)

Houses form a circle (first and last are adjacent). Run the linear House
Robber twice (without the last house, without the first) and take the max.
"""

def rob(nums):
    # TODO
    return 0


# --- self-check: do not modify below this line ---
print(rob([2, 3, 2]), rob([1, 2, 3, 1]), rob([1, 2, 3]), rob([5]))
print("PASS" if (rob([2, 3, 2]), rob([1, 2, 3, 1]), rob([1, 2, 3]), rob([5])) == (3, 4, 3, 5) else "FAIL")
