Retired
Shortest unique prefixes for every word in a list (retired)
12john-bai
Description:
Given an array of unique words, return an array containing the shortest unique prefix for each word in the list. Please assume that no word in the input array is the prefix of another word. For example, you will never have an input array containing "kata" and "katas".
For example:
Input: [ 'zebra', 'dog', 'duck', 'dove' ]
Output: [ 'z', 'dog', 'du', 'dov' ]
*Note: prefixes do not have to be returned in any particular order.
Algorithms
Similar Kata:
Stats:
Created | Sep 27, 2016 |
Warriors Trained | 36 |
Total Skips | 1 |
Total Code Submissions | 33 |
Total Times Completed | 12 |
JavaScript Completions | 12 |
Total Stars | 3 |
% of votes with a positive feedback rating | 38% of 4 |
Total "Very Satisfied" Votes | 1 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 3 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |