Skip to content

Conversation

singhsayan
Copy link

Problem: House Robber (LeetCode Problem 198)
Issue Linked: Closes #514

Contribution:
Added C++ solutions under C++/HouseRobber.cpp.
Implemented three approaches:
1. Recursion + Memoization — O(n) time, O(n) space
2. Tabulation (Bottom-Up DP) — O(n) time, O(n) space
3. Space Optimized DP (Final Solution) — O(n) time, O(1) space
• Included clear comments and structured code for readability.
• Added example test case for validation.

Example:
Input: [2,7,9,3,1]
Output: 12

…cursion+memoization, tabulation, and space-optimized DP
Copy link

welcome bot commented Aug 28, 2025

I can tell this is your first pull request! Thank you I'm so honored. 🎉🎉🎉 I'll take a look at it ASAP!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue Proposal: House Robber (LeetCode Problem 198)
1 participant