Skip to content

Commit

Permalink
edit house robber, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Naughton Jr authored and Kevin Naughton Jr committed May 29, 2018
1 parent 4b06ffc commit 76a22ae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [简体中文](./README-zh-cn.md)

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

## Instagram
* [Programeme](https://www.instagram.com/programeme/)

## Articles
* [Starting Work](https://medium.com/@Naughton/starting-work-b06e10f6007e)

Expand Down
4 changes: 0 additions & 4 deletions company/airbnb/HouseRobber.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ public int rob(int[] nums) {
for(int i = 2; i < nums.length; i++) {
dp[i] = Math.max(dp[i - 2] + nums[i], dp[i - 1]);
}

for(int i = 0; i < dp.length; i++) {
System.out.print(dp[i] + " ");
}

return dp[dp.length - 1];
}
Expand Down
5 changes: 0 additions & 5 deletions company/linkedin/HouseRobber.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public class HouseRobber {
public int rob(int[] nums) {
if(nums.length == 0) {
return 0;

}

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

for(int i = 0; i < dp.length; i++) {
System.out.print(dp[i] + " ");
}

return dp[dp.length - 1];
}
}
4 changes: 0 additions & 4 deletions leetcode/dynamic-programming/HouseRobber.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ public int rob(int[] nums) {
dp[i] = Math.max(dp[i - 2] + nums[i], dp[i - 1]);
}

for(int i = 0; i < dp.length; i++) {
System.out.print(dp[i] + " ");
}

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

0 comments on commit 76a22ae

Please sign in to comment.