Given an array nums representing houses in a circle, return the maximum amount you can rob without robbing adjacent houses. Pattern focus: House robber. The circular condition means you must exclude either the first house or the last house.
nums = money in circularly arranged houses
maximum amount that can be robbed
Example 1:
Input:
nums = [2,3,2]
Output:
3
Explanation:
You cannot rob both the first and last houses.
Example 2:
Input:
nums = [1,2,3,1]
Output:
4
Explanation:
The best plan is to rob houses 2 and 4.