PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Meta

Maximize Unique Letters

Last updated: Apr 16, 2026

Quick Overview

This question evaluates proficiency in combinatorial optimization, bit manipulation, and state-compression techniques for selecting subsets under uniqueness constraints.

  • medium
  • Meta
  • Coding & Algorithms
  • Machine Learning Engineer

Maximize Unique Letters

Company: Meta

Role: Machine Learning Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Given a list of lowercase words, choose any subset of words such that: - no selected word contains a repeated character internally, and - no character appears in more than one selected word across the subset. Return the maximum possible number of distinct characters covered by the selected subset. Follow-up stages: 1. Solve the exact problem for small inputs such as `n <= 12`. 2. Scale the solution to much larger inputs, potentially up to around `10^4` words. You should preprocess each word into a 26-bit mask, discard words that are internally invalid, and describe or implement pruning and a more scalable state-compression strategy.

Quick Answer: This question evaluates proficiency in combinatorial optimization, bit manipulation, and state-compression techniques for selecting subsets under uniqueness constraints.

Related Interview Questions

  • Find Shortest Unique Prefixes - Meta (medium)
  • Compute Exclusive Execution Times - Meta (medium)
  • Solve Tree Columns And Maze Variants - Meta (medium)
  • Solve Tree Diameter and Palindromic Counts - Meta (medium)
  • Simulate Monster Team Battles - Meta (hard)
Meta logo
Meta
Feb 8, 2026, 12:00 AM
Machine Learning Engineer
Technical Screen
Coding & Algorithms
1
0
Loading...

Given a list of lowercase words, choose any subset of words such that:

  • no selected word contains a repeated character internally, and
  • no character appears in more than one selected word across the subset.

Return the maximum possible number of distinct characters covered by the selected subset.

Follow-up stages:

  1. Solve the exact problem for small inputs such as n <= 12 .
  2. Scale the solution to much larger inputs, potentially up to around 10^4 words. You should preprocess each word into a 26-bit mask, discard words that are internally invalid, and describe or implement pruning and a more scalable state-compression strategy.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Meta•More Machine Learning Engineer•Meta Machine Learning Engineer•Meta Coding & Algorithms•Machine Learning Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ 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.