FastPrepProduct of Subset Maxima
Problems/Product of Subset Maxima

Product of Subset Maxima

Arcesium logoArcesium● MediumFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in an Arcesium full-time online assessment. The report links directly to the prompt. Our version is about 99% the same as the reported question.

Given an array values of positive integers, consider every non-empty subset of array indices. The value of a subset is the maximum array value selected by that subset.

Return the product of the values of all non-empty subsets, modulo 10^9 + 7.

Two equal values at different indices are still distinct selectable elements.

Function

productOfSubsetMaxima(values: int[]) → int

Examples

Example 1

values = [1,2,3]return = 324

The seven non-empty subsets have maxima 1, 2, 3, 2, 3, 3, 3. Their product is 324.

Example 2

values = [1,1,1,1]return = 1

Every non-empty subset has maximum value 1.

Constraints

  • values.length >= 1.
  • Every element of values is positive.

More Arcesium Online Assessment questions

  • City Infection NumberOA · Seen Jul 2025
  • Minimum Tunnel Crossing TimeOA · Seen Jul 2025
  • Reconstruct the Root StreamOA · Seen Jul 2025
  • Add DigitsOA · Seen Aug 2023
  • Binary Tree Maximum Path SumOA · Seen Aug 2023
  • Detect a Cycle in Directed Hate RelationshipsOA · Seen Aug 2023
  • Reverse First K Characters in Every 2K BlockOA · Seen Aug 2023
  • Robo Data Sharing DirectionOA · Seen Jul 2023
  • Capital Gains Tax from TradesOA · Seen Feb 2021
  • K-th Character in an Infinite StringOA · Seen Aug 2020

Similar questions at other companies

  • Sum of Pipeline Response TimesBloomberg LP · OABloomberg LP interview questions
  • Capping Portfolio WeightsCapstone Investment Advisors · OA
  • Maximize Revenue from Decreasing InventoryChubb · OAChubb interview questions
  • Macaron Order PriceOpenAI · OAOpenAI interview questions
  • Get Triplet CountIBM · OAIBM interview questions
  • Linear InterpolatorTwo Sigma · OATwo Sigma interview questions
  • Count Reverse-Digit PairsVisa · OAVisa interview questions
  • Get Triplet CountPoint72 · OAPoint72 interview questions
  • Stable Robot ConfigurationsAmazon · OA
  • REST API: Energy BarRippling · OARippling interview questions
All Arcesium interview questionsSee Arcesium hiring insights
Saved
class Solution {
    public int productOfSubsetMaxima(int[] values) {
      // Write your code here.
    }
}
Checking account…