FastPrepMaximum Unique-Character Word Subset
Problems/Maximum Unique-Character Word Subset

Maximum Unique-Character Word Subset

Meta logoMeta● MediumFULLTIMEONSITE INTERVIEW

Updated Aug 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The original report asks for a subset of words with no repeated selected character and maximum total length. It does not define internal duplicates, the returned representation, the alphabet, or portable bounds. This practice version uses the conventional lowercase-letter model and returns only the maximum length.

Given an array of lowercase English words, choose a subset whose concatenation contains no repeated character. Return the maximum possible length of such a concatenation.

A word that repeats a character inside itself cannot be selected. The order of selected words does not affect validity, and the empty subset is allowed. Return only the maximum length, not the selected subset.

Function

maxUniqueCharacterSubsetLength(words: String[]) → int

Examples

Example 1

words = ["un","iq","ue"]return = 4

Selecting un and iq produces four distinct characters. Adding ue would repeat u.

Example 2

words = ["cha","r","act","ers"]return = 6

Selecting cha and ers produces the six distinct characters in chaers.

Example 3

words = ["aa","bc"]return = 2

The word aa is invalid because it repeats a internally. Selecting only bc gives length 2.

Constraints

  • 0 <= words.length <= 16.
  • 1 <= words[i].length <= 26.
  • Every word contains only lowercase English letters.

More Meta Onsite Interview questions

  • Multi-Head Attention Forward PassPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Run-Length Encoded Vector Dot ProductPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Mutual-Friend RecommendationsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Deterministic K-Means AssignmentsPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Linear Layer Forward and Backward PassesONSITE INTERVIEW · Seen Sep 2026
  • Reservoir Sampling with Recorded DrawsONSITE INTERVIEW · Seen Sep 2026
  • Stochastic Gradient Descent with MomentumONSITE INTERVIEW · Seen Sep 2026
  • Top K Largest Values with a HeapONSITE INTERVIEW · Seen Sep 2026
  • Partition a Card Deck into FifteensONSITE INTERVIEW · Seen Sep 2026
  • Insert into a Sorted Circular ListONSITE INTERVIEW · Seen Aug 2026

Similar questions at other companies

  • Insert Addition and Multiplication OperatorsPinterest · ONSITE INTERVIEWPinterest interview questions
  • Generate All Valid Word AbbreviationsSalesforce · ONSITE INTERVIEWSalesforce interview questions
  • SubsetsBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • SubsetsGoogle · ONSITE INTERVIEWGoogle interview questions
  • Optimal Account BalancingAmazon · ONSITE INTERVIEW
  • Hybrid Run-Length and Bit-Packing EncoderDatabricks · ONSITE INTERVIEWDatabricks interview questions
  • Word Search IIKotak Mahindra Bank · ONSITE INTERVIEWKotak Mahindra Bank interview questions
  • Largest Number Below N from Reusable DigitsByteDance · PHONE SCREENByteDance interview questions
  • SubsetsTemu · PHONE SCREENTemu interview questions
  • Count String Pairs With Disjoint CharactersNetflix · PHONE SCREENNetflix interview questions

Meta interview experiences

  • Meta PhD SWE Intern AI Coding Phone Screen: 1 Experience
  • Meta Business Support Engineer Phone Screen: 1 Experience
  • Meta Software Engineer Onsite Questions: 3 Experiences
  • Meta AI Native Engineer OA and Onsite: 1 Experience
  • Meta AI-Native Coding Interview: 3 Experiences
  • Meta Production Engineer Intern Questions: 6 Experiences
All Meta interview questionsSee Meta hiring insights
Saved
class Solution {
    public int maxUniqueCharacterSubsetLength(String[] words) {
        // Write your code here.
    }
}
Checking account…