House Robber II — Medium Coding Interview Question
Houses are arranged in a circle. Return the maximum money you can rob without alerting police.
Example
Input: nums = [2,3,2]
Output: 3
Constraints
Topics & Companies
Topics: dp
Asked by: Google, Microsoft
Optimal Solution Complexity
Time complexity: O(n). Space complexity: O(1).
Practice more