# Product of Array Except Self

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/2278/product-of-all-elements-except-i
Source observed: 2026-11-04T22:21:36.502Z
Last checked: 2026-11-04T22:21:36.502+00:00
Indexed: 2026-11-06T17:02:47.148+00:00

---

# Product of Array Except Self

**Difficulty:** Medium  
**Category:** [Data Structures & Algorithms](https://www.aced.io/questions?type=algorithms)  
**Reported last asked:** 5 months ago  
**Save count:** 92  
**Interview experiences:** 2 shared

## Challenge

Given an array `nums` of `n` integers where `n > 1`, return an array `output` such that each element at index `i` of `output` is equal to the product of all the numbers in the original array except `nums[i]`.

### Examples

```text
nums = [1, 2, 3, 4]
output = [24, 12, 8, 6]

nums = [0, 0]
output = [0, 0]

nums = [4, 5, 1, 8, 2]
output = [80, 64, 320, 40, 160]

nums = [-2, 1, -3, 4, -1]
output = [12, -24, 8, -6, 24]
```

The available practice interface includes **Question**, **Solution**, **Mock Interview**, and **Community** tabs. We also provide an editor with **Editor** and **Share** views, plus **Output**, **Test Results**, and **Console** panels. Sign up to run code: [Sign up to run code](https://www.aced.io/signup?src=lesson).

There are currently no community-contributed answers listed for this question.

## Interview experiences

Two shared experiences are listed:

- **[Meta · 5 months ago](https://www.aced.io/experiences/meta-facebook-senior-software-engineer-interview-72a6bd)** — Software Engineer, Senior / L5. “The process was smooth, general interview skills, prepare well to discuss you solution before coding / jumping to the optimized solution.”
- **[Amazon · 2 years ago](https://www.aced.io/experiences/amazon-software-engineer-interview-bb8564)** — Software Engineer, Mid Level / L4. “Too much bureaucratic process. Be prepared for ghosting. They expedite after onsites. Negotiation can take few rounds. Be patient, they do not throw away strong candidates.”

## 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)

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

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

![Data Engineering Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/5XoOCgXlGqN2fa1zaroNWd/9a2e23df48a212bc00d352873feb2d6a/Data_Engineer_Interview_Prep_Hero_Image.jpg?w=800&h=800&fm=webp&q=75)

We help candidates prepare for data engineering roles at Meta, Google, Amazon, Microsoft, Walmart, DoorDash, and other top companies. Preparation covers data modeling, pipeline design, SQL, coding, and behavioral interviews.

## Explore Aced

Aced, formerly Exponent, provides interview preparation courses, interview questions, practice tools, coaching, interview experiences, job referrals, and related resources.

- [All questions](https://www.aced.io/questions)
- [Courses](https://www.aced.io/courses?src=nav)
- [Interview experiences](https://www.aced.io/experiences?src=nav)
- [Practice](https://www.aced.io/practice?src=nav)
- [Coaching](https://www.aced.io/coaching?src=nav)
- [Pricing](https://www.aced.io/upgrade?src=nav)
- [Log in](https://www.aced.io/login?src=nav)
- [Sign up](https://www.aced.io/signup?src=nav)

### Course areas

- [Product Management](https://www.aced.io/courses/pm?src=nav) — Ace product interviews from strategy cases to technical skills.
- [Forward Deployed](https://www.aced.io/courses/forward-deployed-engineering?src=nav) — Beta preparation for FDE loops at Anthropic, OpenAI, Palantir, and more.
- [Engineering Management](https://www.aced.io/courses/engineering-management?src=nav) — Review leadership and people-management skills.
- [Software Engineering](https://www.aced.io/courses/software-engineering?src=nav) — Learn strategies for coding problems.
- [System Design](https://www.aced.io/courses/system-design-interviews?src=nav) — Define architectures, interfaces, and databases under time pressure.
- [Data Science](https://www.aced.io/courses/data-science?src=nav) — Practice statistical techniques and experimentation.
- [Machine Learning](https://www.aced.io/courses/ml-engineer?src=nav) — Review building, evaluating, and deploying AI/ML models.
- [Data Engineering](https://www.aced.io/courses/data-engineering?src=nav) — Design complex data models and ETL pipelines.
- [AI Engineering](https://www.aced.io/courses/ai-engineering?src=nav) — New.
- [Investment Banking](https://www.aced.io/ib?src=nav) — New.
- [Generative AI](https://www.aced.io/courses/gen-ai-interviews?src=nav)
- [Security Engineer](https://www.aced.io/courses/security-engineer?src=nav)
- [TPM](https://www.aced.io/courses/tpm?src=nav)
- [Solutions Architect](https://www.aced.io/courses/solution-architect-interview?src=nav)
- [UX / Product Design](https://www.aced.io/courses/product-designer-interview?src=nav)
- [BizOps & Strategy](https://www.aced.io/courses/bizops?src=nav)
- [View all courses](https://www.aced.io/courses?src=nav)

### Question categories

- [Product Management](https://www.aced.io/questions?role=pm&src=nav)
- [Behavioral Questions](https://www.aced.io/questions?type=behavioral&src=nav)
- [Coding Questions](https://www.aced.io/questions?type=algorithms&filterBy=codeEditor&src=nav)
- [System Design](https://www.aced.io/questions?type=system-design&src=nav)
- [SQL Questions](https://www.aced.io/questions?type=sql&filterBy=codeEditor&src=nav)
- [Machine Learning](https://www.aced.io/questions?role=ml-engineer&type=machine-learning&type=concept&src=nav)
- [Investment Banking](https://www.aced.io/questions?role=investment-banking&src=nav)
- [Data Engineering](https://www.aced.io/questions?role=data-engineer&type=data-pipeline-design&type=system-design&type=sql&type=data-modeling&src=nav)
- [Browse all questions](https://www.aced.io/questions?src=nav)

### Additional services and resources

- [Job Referrals](https://www.aced.io/jobs/referrals?src=nav) — Get job referrals to top technology companies.
- [Blog](https://www.aced.io/blog?src=nav) — Interviewing tips and strategies.
- [Resources](https://www.aced.io/resources?src=nav) — Members-only articles, videos, and interviews.
- [Work with us](https://www.aced.io/collaborate?src=nav)
- [Perks](https://www.aced.io/perks?src=nav)
- [For universities](https://www.aced.io/pages/university?src=nav)
- [For businesses](https://www.aced.io/pages/business?src=nav)
- [For recruiters](https://www.aced.io/jobs/post?src=nav)
- [Affiliate program](https://www.aced.io/affiliate?src=nav)

To unlock detailed company statistics for this question, use [Upgrade](https://www.aced.io/upgrade?src=questions).

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F2278%2Fproduct-of-all-elements-except-i&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%2F2278%2Fproduct-of-all-elements-except-i). Opening a form does not execute a tool.