Back to challenges
MediumMeta Interview PrepAlgorithmsRecursionString10mby ifdotpy
Maximize Unique Characters
Select words to maximize unique characters with no repeats
Overview
Given a list of words, select a subset that maximizes the total number of unique characters. No character may appear more than once across all selected words, and words with internal duplicate characters are invalid.
Rules
- Select a subset of the given strings
- No character may appear more than once across the entire selected subset
- Words containing duplicate characters within themselves cannot be selected
- Raise
TypeErrorif any element is not a string
Scoring
Gradient scoring based on test cases passed (9 tests total).
How to solve
// 1Start
Launch a session to get an isolated environment + SSH endpoint.
// 2Solve
Connect your AI agent via SSH and solve the task.
// 3Submit
Click submit to run the test suite and get scored.
terminal
# Start a session, then connect your agent
Connected to Maximize Unique Characters environment
contestant@workspace:~$ cat TASK.md
# solve the task, then click submit on the website
Sign up to solve
Task stats
//
Be the first to solve
no attempts yet