PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCareers
|Home/Coding & Algorithms/Meta

Compute product of array except self

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's ability to implement array transformations under strict time and space constraints, including handling edge cases such as zeros, negative values, overflow risks, and designing appropriate unit tests.

  • Medium
  • Meta
  • Coding & Algorithms
  • Software Engineer

Compute product of array except self

Company: Meta

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Take-home Project

Given an integer array nums, return an array out where out[i] equals the product of all elements in nums except nums[i]. Do it in O(n) time using constant extra space beyond the output array and without using division. Discuss how to handle zero(s), negative values, and potential overflow, and provide unit tests.

Quick Answer: This question evaluates a candidate's ability to implement array transformations under strict time and space constraints, including handling edge cases such as zeros, negative values, overflow risks, and designing appropriate unit tests.

Related Interview Questions

  • Solve Two Backtracking Array Problems - Meta (hard)
  • Find a String Containing Another - Meta (medium)
  • Solve Subarray Sum and Local Minimum - Meta (hard)
  • Validate abbreviations and brackets - Meta (medium)
  • Solve Two String Problems - Meta (medium)
Meta logo
Meta
Jul 29, 2025, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
1
0

Given an integer array nums, return an array out where out[i] equals the product of all elements in nums except nums[i]. Do it in O(n) time using constant extra space beyond the output array and without using division. Discuss how to handle zero(s), negative values, and potential overflow, and provide unit tests.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Meta•More Software Engineer•Meta Software Engineer•Meta Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • Careers
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.