Bug in test case?

  • 0

    I'm currently stuck on one test case where the tree looks like this:

         / \
        1   3

    I get 6 with my answer, which is what I would expect, but the test case's expected result is 7? Why and how?

  • 1

    How do you not see 3+4?

  • 0

    Oh, I get it now. My interpretation of this question was that you can't rob houses that are on adjacent levels.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.