Maximum sum of non-adjacent houses, on a line, a circle and a tree
Each house holds some value and you cannot take two neighbours. Find the best total for houses in a row, then for houses arranged in a circle, then for houses arranged as a binary tree where parent and child count as neighbours.
No answer yet. Write the first one; the best answer gets endorsed.
