Skip to content

[Prefix Sum] Product of Array Except Self #54

@sudosf

Description

@sudosf

Problem

Given an integer array, return an array where each element is the product of all other elements. Must run in O(n) without using the division operator.

References

Difficulty

🟡 Medium

Companies

Amazon, Facebook, Flipkart

Notes

Language: Java
Left prefix products pass, then right suffix products pass. No division needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    arraysArray problemsmediumMedium difficultyprefix-sumPrefix sum pattern

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions