Skip to content

Latest commit

 

History

History
 
 

162

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

This problem was asked by Square.

Given a list of words, return the shortest unique prefix of each word. For example, given the list:

  • dog
  • cat
  • apple
  • apricot
  • fish

Return the list:

  • d
  • c
  • app
  • apr
  • f