Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The description does not really explain how the algorithm works. It doesn't just combine the last/first
1
character, but as many as are common from the beginning and end of the separate words.For example,
'fat ata tape' => 'fatape'
.The description has no such example, even though it's made mostly clear by the test cases. This makes it a little more challenging.
I'm pretty disappointed to see everyone's solution running in (best case)
Ω(n)
time instead of (worst case)O(n)
and average expected value ofO(2)
for large random tests.pig_it("I agree!!!")