House Robber III
Medium
Tree DP & Advanced Trees
Houses form a binary tree and the thief cannot rob two directly linked houses. Given the tree in level-order form (values are money), print the maximum amount that can be robbed.
Constraints
1 <= number of nodes <= 10^4 0 <= value <= 10^4
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.