PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Point72

Maximize outfits with distinct colors

Last updated: Jun 5, 2026

Quick Overview

This question evaluates competency in combinatorial optimization and constrained resource-allocation algorithms, along with analysis of time and space complexity and robustness to skewed input distributions and edge cases.

  • Medium
  • Point72
  • Coding & Algorithms
  • Data Scientist

Maximize outfits with distinct colors

Company: Point72

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

You're given counts of items by color; each outfit must contain exactly 3 items, all of distinct colors. You cannot reuse items. Input formats: either an array counts where counts[i] is the number of items of color i (0-indexed), or a multiset of color labels (e.g., ['red','red','blue','green',...]). Tasks: - Return the maximum number of outfits possible and construct one valid assignment for the first min(10, answer) outfits. - Achieve O(C log C) time where C is the number of colors, and O(C) extra space; total items can be up to 10^6. - Prove optimality or argue why your algorithm attains the maximum. Hint: a greedy max-heap by remaining counts is likely necessary; beware of pathological distributions (e.g., [100,1,1,...]). - Handle edge cases: fewer than three nonzero colors; extremely skewed counts; many colors with count=1. - Example: counts = [3,2,2,1] should yield 2 outfits; one valid schedule is [(color0,color1,color2),(color0,color1,color3)].

Quick Answer: This question evaluates competency in combinatorial optimization and constrained resource-allocation algorithms, along with analysis of time and space complexity and robustness to skewed input distributions and edge cases.

Related Interview Questions

  • Solve SQL and PySpark Data Tasks - Point72 (easy)
  • Implement Portfolio Trading Optimizer - Point72 (hard)
  • Implement Election Report and Banking Pipeline - Point72 (hard)
  • Find the Smallest String After One Decrement - Point72 (medium)
  • Implement composition and mixin utilities - Point72 (hard)
Point72 logo
Point72
Oct 13, 2025, 9:49 PM
Data Scientist
Technical Screen
Coding & Algorithms
3
0

You're given counts of items by color; each outfit must contain exactly 3 items, all of distinct colors. You cannot reuse items. Input formats: either an array counts where counts[i] is the number of items of color i (0-indexed), or a multiset of color labels (e.g., ['red','red','blue','green',...]). Tasks:

  • Return the maximum number of outfits possible and construct one valid assignment for the first min(10, answer) outfits.
  • Achieve O(C log C) time where C is the number of colors, and O(C) extra space; total items can be up to 10^6.
  • Prove optimality or argue why your algorithm attains the maximum. Hint: a greedy max-heap by remaining counts is likely necessary; beware of pathological distributions (e.g., [100,1,1,...]).
  • Handle edge cases: fewer than three nonzero colors; extremely skewed counts; many colors with count=1.
  • Example: counts = [3,2,2,1] should yield 2 outfits; one valid schedule is [(color0,color1,color2),(color0,color1,color3)].

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Point72•More Data Scientist•Point72 Data Scientist•Point72 Coding & Algorithms•Data Scientist Coding & Algorithms
PracHub

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

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • 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.