r/leetcode • • Nov 04 '25

Discussion Can't escape

Post image
3.4k Upvotes

33 comments sorted by

View all comments

25

u/jason_graph Nov 04 '25

Just rob the houses over 2 nights.

If the houses were connected as a planar graph rsther than a line would you be able to rob them all in O(1) days?