# House Robber — coding interview question | Aced

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/questions/4646/house-robber
Source observed: 2026-11-04T23:17:42.260Z
Last checked: 2026-11-04T23:17:42.26+00:00
Indexed: 2026-11-06T05:15:27.552+00:00

---

# House Robber: maximize money without robbing adjacent houses

We provide this coding interview question in our Aced (formerly Exponent) question library. It asks you to solve a data-structures-and-algorithms problem involving an array of house values.

## Problem

You are given an array representing the value in each house, arranged in a line. Find the maximum amount a robber can steal without stealing from two adjacent houses.

**Example:** Given `[100, 20, 40, 70, 80]`, return `100 + 40 + 80 = 220`.

- **Category:** Data Structures & Algorithms; Coding
- **Reported last asked:** 3 months ago
- **Interview experiences:** 2 shared
- **Roles associated with this question:** Software Engineer (2), Machine Learning Engineer (2), Data Engineer (2), Data Scientist
- **Companies associated with this question:** Amazon, Google, Apple, Adobe, Walmart Labs, Goldman Sachs, Salesforce

[Browse all questions](https://www.aced.io/questions)

## Interview experiences

### Amazon · 3 months ago

> “The process was pretty clear and straitforward. As long as coding skill is well prepared. You should be fine.”

**Role:** Software Engineer · Entry Level / L3

[Read the Amazon interview experience](https://www.aced.io/experiences/amazon-software-engineer-interview-4801db)

### Google · 10 months ago

> “I interviewed for an AI Engineer internship, but the process was mostly DSA-heavy. I had an online coding round first, then a technical round with binary tree and DP questions, then another harder DSA round with DP and linked list questions, and finally an HR round. The online round covered arrays and strings, and the later rounds got progressively more difficult. The only non-DSA part was the last round, where they asked about my projects and previous experience. I didn't share the final outcome, but the main thing that stood out to me was how coding-focused the whole process was.”

**Role:** Machine Learning Engineer · Intern

[Read the Google interview experience](https://www.aced.io/experiences/google-machine-learning-engineer-intern-interview-d43fed)

## Community answers

No answers have been contributed by the community yet. Sign in or create an account to submit an answer; submitting marks the question complete.

## Related courses

### [Machine Learning Engineer Interview Prep](https://www.aced.io/courses/ml-engineer)

![Machine Learning Engineer Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/6UfkHxUyLQVfDHSfLNQtWa/1be1539a65b4f6f15201f5b573c0a578/ML_Engineer_Interview_Prep_Course.jpeg?w=800&h=800&fm=webp&q=75)

Prepare for machine-learning roles at Meta, Google, Amazon, Apple, Microsoft, Nvidia, and other top companies with mock interviews, frameworks, and advice from senior candidates. Topics include ML system design, core concepts, coding, behavioral interviews, and more.

### [Data Science Interview Prep](https://www.aced.io/courses/data-science)

![Data Science Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/3U4C5C0OkDR0UeGch4AmlE/7ad489430b676a088cb973307fe77884/Data_Science_Interview_Prep_Course.jpeg?w=800&h=800&fm=webp&q=75)

Prepare for data-science roles at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Practice statistics, experimentation, coding, SQL, machine learning, behavioral interviews, and more, using mock interviews, frameworks, and advice from senior candidates.

## Answering

Log in or sign up to answer this question. Use the **Submit** action after entering your answer.

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F4646%2Fhouse-robber&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F4646%2Fhouse-robber). Opening a form does not execute a tool.