Reported interview periodNov 2025
Maximum Non-Conflicting Robbery Value
Given non-negative values associated with houses, select a subset with maximum total value subject to adjacency constraints.
Practice focusImplementation requirements 1. Linear street: adjacent houses cannot both be selected. For example, rob([1,2,3,1]) == 4 . 2. Circular street: the first and last houses are adjacent. A single house may be selected. 3. Tree neighborhood: each node is a dictionary with a non-negative integer val and optional left and right child dictionaries (absent or None means no child). Selecting a node forbids its children. The input is a finite acyclic binary tree, not a shared-node graph. 4.…