Cody

# Problem 1376. Find names/words that start and end with the same letter.

Solution 1968865

Submitted on 9 Oct 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
inStr = 'Cedric loves regular expressions' ; output_correct = {'Cedric', 'regular'} ; assert(isequal(getWordsSameStartEnd(inStr),output_correct))

Unrecognized function or variable 'in'. Error in getWordsSameStartEnd (line 2) words = regexpi(in, '[a-z]+', 'match'); Error in Test1 (line 3) assert(isequal(getWordsSameStartEnd(inStr),output_correct))

2   Fail
inStr = 'Single neuron Cedric, Anna-Maria, Andrei, a koala' ; output_correct = {'neuron', 'Cedric', 'Anna-Maria'} ; assert(isequal(getWordsSameStartEnd(inStr),output_correct))

Unrecognized function or variable 'in'. Error in getWordsSameStartEnd (line 2) words = regexpi(in, '[a-z]+', 'match'); Error in Test2 (line 3) assert(isequal(getWordsSameStartEnd(inStr),output_correct))

3   Fail
inStr = '__dEdiCaTeD__, REGULAR_EXPRESSION.. Rotor-1 and abracadabra' ; output_correct = { 'dEdiCaTeD', 'REGULAR', 'abracadabra'} ; assert(isequal(getWordsSameStartEnd(inStr),output_correct))

Unrecognized function or variable 'in'. Error in getWordsSameStartEnd (line 2) words = regexpi(in, '[a-z]+', 'match'); Error in Test3 (line 3) assert(isequal(getWordsSameStartEnd(inStr),output_correct))