Cody

Solution 1894845

Submitted on 8 Aug 2019 by Todd Snow
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   Pass
a = 'xkayakyy'; p = 'kayak'; assert(isequal(p,pal(a)));

b = 'k' x = 2 temp = 'aya' temp = 'kayak' b = 'kayak'

2   Pass
a = '3.141592653589793238462643383279502884197169399375105820974944592307816406286'; p = '46264'; assert(isequal(p,pal(a)));

b = '.' x = 2 temp = '141' b = '141' temp = '535' temp = '979' temp = '323' temp = '626' temp = '46264' b = '46264' temp = '383' temp = '939' temp = '494'

3   Pass
a = 'truly I say: able was I ere I saw elba, but that is another story'; p = 'able was I ere I saw elba'; assert(isequal(p,pal(a)));

b = 'r' x = 2 temp = ' I ' b = ' I ' temp = ' I ' temp = 'ere' temp = ' ere ' temp = 'I ere I' temp = ' I ere I ' temp = 's I ere I s' temp = 'as I ere I sa' temp = 'was I ere I saw' temp = ' was I ere I saw ' temp = 'e was I ere I saw e' temp = 'le was I ere I saw el' temp = 'ble was I ere I saw elb' temp = 'able was I ere I saw elba' b = 'able was I ere I saw elba' temp = ' I ' temp = 't t'

Suggested Problems

More from this Author95