Product of All Other Elements
Asked at Apple · Coding Questions · Difficulty: Medium
Given an integer array `nums`, build and return a new array `output` of the same length where `output[i]` is the product of every element of `nums` except `nums[i]`. Zeros may appear in the input, and the array may contain a single element.
Loading the problem…
More Apple interview questions
- LLM conceptual questions
- Implement a Two-Hidden-Layer MLP with Backpropagation in NumPy
- Compare PPO, DPO, and GRPO
- Implement a Vision Transformer (ViT) from Scratch
- Sample from a Gaussian Distribution Using Only Uniform Sampling
- ML Fundamentals and Model Debugging Rapid-Fire