Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Exact duplicate of this problem: https://leetcode.com/problems/house-robber/ from leetcode.
Returning
-1
when there are no houses to be robbed is ridiculous. Just expect0
.Expected and actual are reversed for random tests.
This comment is hidden because it contains spoiler information about the solution
Please organize the tests better and separate the fixed tests from random tests.
Also you should add the
it
blocks too because without them it's arguably not the correct test indentation and some things (automatic test result collapsing and timing) will not work.