# Product of Array Except Self

> LeetCode #238 — Product of Array Except Self. Solve on LeetCode, then implement here if you want it in your drill queue.

https://leetcode.com/problems/product-of-array-except-self/

Canonical: https://learn.significanthobbies.com/curriculum/drills/lc-product-of-array-except-self

LeetCode #238 — Product of Array Except Self. Solve on LeetCode, then implement here if you want it in your drill queue.

https://leetcode.com/problems/product-of-array-except-self/

## The mechanism

A hash map trades memory for time: it turns an O(n) scan for "have I seen this?" into an O(1) lookup. Most array problems that feel quadratic collapse to linear once you ask what you would store in a map keyed by value, complement, or frequency.

## Expected evidence

Pass all LeetCode test cases for this problem.

## Hints

- Pattern hint: array hashing.
- Start with brute force, then optimize time/space.
- Write down invariants before coding.

## Sources and practice

- [Hash table (Wikipedia)](https://en.wikipedia.org/wiki/Hash_table)
- [Study Arrays & Hashing](https://learn.significanthobbies.com/curriculum/concepts/array-hashing)
- [Try the interactive drill](https://learn.significanthobbies.com/drills/lc-product-of-array-except-self)
- [All practice briefs](https://learn.significanthobbies.com/curriculum/drills/)
