Skip to content

Commit 33c3215

Browse files
Kevin Naughton JrKevin Naughton Jr
authored andcommitted
edit house robber, update README
1 parent f1fdb58 commit 33c3215

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- [简体中文](./README-zh-cn.md)
99

1010
## Table of Contents
11+
- [Instagram](#instagram)
1112
- [Articles](#articles)
1213
- [Online Judges](#online-judges)
1314
- [Live Coding Practice](#live-coding-practice)
@@ -21,6 +22,9 @@
2122
- [Computer Science News](#computer-science-news)
2223
- [Directory Tree](#directory-tree)
2324

25+
## Instagram
26+
* [Programeme](https://www.instagram.com/programeme/)
27+
2428
## Articles
2529
* [Starting Work](https://medium.com/@Naughton/starting-work-b06e10f6007e)
2630

company/airbnb/HouseRobber.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ public int rob(int[] nums) {
2020
for(int i = 2; i < nums.length; i++) {
2121
dp[i] = Math.max(dp[i - 2] + nums[i], dp[i - 1]);
2222
}
23-
24-
for(int i = 0; i < dp.length; i++) {
25-
System.out.print(dp[i] + " ");
26-
}
2723

2824
return dp[dp.length - 1];
2925
}

company/linkedin/HouseRobber.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ public class HouseRobber {
66
public int rob(int[] nums) {
77
if(nums.length == 0) {
88
return 0;
9-
109
}
1110

1211
if(nums.length == 1) {
@@ -22,10 +21,6 @@ public int rob(int[] nums) {
2221
dp[i] = Math.max(dp[i - 2] + nums[i], dp[i - 1]);
2322
}
2423

25-
for(int i = 0; i < dp.length; i++) {
26-
System.out.print(dp[i] + " ");
27-
}
28-
2924
return dp[dp.length - 1];
3025
}
3126
}

leetcode/dynamic-programming/HouseRobber.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ public int rob(int[] nums) {
2121
dp[i] = Math.max(dp[i - 2] + nums[i], dp[i - 1]);
2222
}
2323

24-
for(int i = 0; i < dp.length; i++) {
25-
System.out.print(dp[i] + " ");
26-
}
27-
2824
return dp[dp.length - 1];
2925
}
3026
}

0 commit comments

Comments
 (0)