Skip to content
← Back to the archive

21 August 2026

First Unique Word

Hard Strings Dictionaries

Find the first word in a sentence that appears only once.

Given a sentence, return the first word that appears exactly once. Ignore letter case and punctuation when comparing words. A word is a consecutive run of English letters. Return the word in lowercase, or return None if every word appears more than once or the sentence contains no words.

Constraints

  • 0 <= len(sentence) <= 1000
  • sentence contains English letters, whitespace, and punctuation
  • Compare words without letter case or punctuation
  • Return the result in lowercase

Function signature

def first_unique_word(sentence):

Sign in to solve this bracket

Reading the problem is free for everyone. Opening the editor and solving it requires an account with Open Bracket+.