Maximum Non-Adjacent Sum on a Circular Street
Asked at NIO · Coding Questions · Difficulty: Medium
A street is a closed loop: its houses stand in a circle, so the last house is next to the first. Each house holds some amount of money. You may collect from any set of houses as long as you never collect from two houses that are next to each other on the loop. Return the largest total you can collect.
Loading the problem…