House Robber III

# Introduction In this challenge, we will be solving the problem of a thief looting houses in a binary tree. The thief can only steal from houses that are not directly connected to each other, as they will trigger the alarm. Given the root of the binary tree, our task is to determine the maximum amount of money the thief can steal without triggering the alarm. We will write a function called `rob3` to solve this problem.

|60 : 00

Click the virtual machine below to start practicing