Tree: Depth-First Search - House Robber III (On Tree)
Consider the following code implementing the optimal House Robber III solution. Given the tree:
3
/ \
2 3
\ \
3 1
What is the value of
rob_current when dfs is called on the root node (value 3)?