5 kyu
Find a word sequence
Description:
When no more interesting kata can be resolved, I just choose to create the new kata, to solve their own, to enjoy the process --myjinxin2015 said
Description:
Find a special word sequence that the tail of each word is the same as the head of the next word(the tail of last word is same as the head of first word).
A global variable wordList
is preloaded(given by a string array and all words are lowercase). All words should select from wordList
.
An argument headTail
will be given, like this:
"c4d4e8"
It means:
Three word should be find out
First word is "c??d"
(head is "c",tail is "d", length is 4)
Second word is "d??e"
(head is "d",tail is "e", length is 4)
Third word is "e??????c"
(head is "e",tail is "c", length is 8)
The number between head and tail is the length of word. It always be a positive integer.
The result should be an array that contains all words:
The result of example above should be one of:
['card','date','economic']
['cold','date','economic']
If no valid result found, return an empty array []
.
Puzzles
Similar Kata:
Stats:
Created | Nov 8, 2016 |
Published | Nov 9, 2016 |
Warriors Trained | 210 |
Total Skips | 4 |
Total Code Submissions | 687 |
Total Times Completed | 71 |
JavaScript Completions | 71 |
Total Stars | 3 |
% of votes with a positive feedback rating | 89% of 36 |
Total "Very Satisfied" Votes | 31 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 6 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 6 kyu |