Walmart Global Tech OA 2024 - Product Array Transformation | Prefix & Suffix Product Approach (Java)
Walmart · Question · Posted Jun 2026
Walmart Global Tech OA 2024 - Product Array Transformation Problem Statement A retail company stores daily sales multipliers for different products in an integer array arr. For each position i, determine the product of all elements in the array except the element at index i. Return a new array where: result[i] = product of all arr[j] where j != i Constraints Do not use division. Expected Time Complexity: O(N) Expected Auxiliary Space: O(1) (excluding output array) Example 1 Input: arr ...
The full answer & interview discussion are available to premium members.
Log in Create a free account