Reported interview periodNot available
Maximum haul from non-adjacent houses
Each house on a street holds a known amount of money, and robbing two neighboring houses on the same night trips the alarm. Choose houses with no two adjacent to collect the largest possible total.
Practice focusRequirements - Line one is the house count. Line two lists that many non-negative integer amounts, separated by spaces. - Adjacency is positional, so choosing the house at index i rules out only i - 1 and i + 1 . - Return the best total as a decimal string with no separators. - A single house contributes its own amount, and a zero amount is a legal choice, so a street of zeros answers 0 . - Every house is a candidate; skipping a house is never required just because it is small. - run case passes case["stdin"] to solve .…