Skip to content

Commit 6055e68

Browse files
solved on 15/10/23
1 parent cfdfe3f commit 6055e68

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

LC_55_HouseRobber.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ int solve(vector<int> &nums, int n, int idx)
2020
}
2121

2222
// recursive solution, gives TLE on leetcode. we'll use DP to optimize it in future
23+
// tc: O(2^n) sc: O(n)
2324
int rob(vector<int> &nums)
2425
{
2526
int n = nums.size();

0 commit comments

Comments
 (0)