House Robber III
MediumLeetCodeAdvanced Trees (BST, LCA, Tree DP)
Approach hintTry it first, then revealHide
Return a pair from every subtree: the best total if its root is robbed and if it is not. Robbing a node forces both children into the not-robbed state.