Cody

Solution 1977690

Submitted on 15 Oct 2019 by Alvin LAU
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 = 'ka' b = 'ay' b = 'ya' b = 'ak' b = 'yy' b = 'kay' b = 'aya' b = 'yak' b = 'kaya' b = 'ayak' b = 'kayak'

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

b = '14' b = '41' b = '15' b = '59' b = '26' b = '53' b = '35' b = '97' b = '79' b = '93' b = '32' b = '23' b = '38' b = '46' b = '62' b = '26' b = '64' b = '33' b = '38' b = '83' b = '32' b = '79' b = '95' b = '50' b = '02' b = '28' b = '88' b = '41' b = '97' b = '93' b = '39' b = '99' b = '93' b = '51' b = '05' b = '82' b = '20' b = '97' b = '49' b = '94' b = '44' b = '59' b = '23' b = '64' b = '62' b = '28' b = '141' b = '535' b = '979' b = '323' b = '238' b = '462' b = '626' b = '264' b = '383' b = '832' b = '028' b = '939' b = '399' b = '993' b = '820' b = '494' b = '4626' b = '6264' b = '3993' b = '46264'

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 = ' I' b = 'I ' b = ' s' b = 'sa' b = 'ab' b = 'bl' b = 'le' b = 'e ' b = ' w' b = 'wa' b = 'as' b = 's ' b = ' I' b = 'I ' b = ' e' b = 'er' b = 're' b = 'e ' b = ' I' b = 'I ' b = ' s' b = 'sa' b = 'aw' b = 'w ' b = ' e' b = 'el' b = 'lb' b = 'ba' b = 't ' b = ' t' b = 't ' b = 's ' b = 'ot' b = 'er' b = ' s' b = 'to' b = ' I ' b = 'I s' b = ' sa' b = 'abl' b = 'ble' b = 'le ' b = 'e w' b = ' wa' b = 'was' b = 'as ' b = 's I' b = ' I ' b = 'I e' b = ' er' b = 'ere' b = 're ' b = 'e I' b = ' I ' b = 'I s' b = ' sa' b = 'saw' b = 'aw ' b = 'w e' b = ' el' b = 'elb' b = 'lba' b = 't t' b = ' I s' b = 'I sa' b = 'able' b = 'ble ' b = 'le w' b = 'e wa' b = ' was' b = 'was ' b = 'as I' b = 's I ' b = ' I e' b = 'I er' b = ' ere' b = 'ere ' b = 're I' b = 'e I ' b = ' I s' b = 'I sa' b = ' saw' b = 'saw ' b = 'aw e' b = 'w el' b = ' elb' b = 'elba' b = ' I sa' b = 'able ' b = 'ble w' b = 'le wa' b = 'e was' b = ' was ' b = 'was I' b = 'as I ' b = 's I e' b = ' I er' b = 'I ere' b = ' ere ' b = 'ere I' b = 're I ' b = 'e I s' b = ' I sa' b = 'I saw' b = ' saw ' b = 'saw e' b = 'aw el' b = 'w elb' b = ' elba' b = 'able w' b = 'ble wa' b = 'le was' b = 'e was ' b = ' was I' b = 'was I ' b = 'as I e' b = 's I er' b = ' I ere' b = 'I ere ' b = ' ere I' b = 'ere I ' b = 're I s' b = 'e I sa' b = ' I saw' b = 'I saw ' b = ' saw e' b = 'saw el' b = 'aw elb' b = 'w elba' b = 'able wa' b = 'ble was' b = 'le was ' b = 'e was I' b = ' was I ' b = 'was I e' b = 'as I er' b = 's I ere' b = ' I ere ' b = 'I ere I' b = ' ere I ' b = 'ere I s' b = 're I sa' b = 'e I saw' b = ' I saw ' b = 'I saw e' b = ' saw el' b = 'saw elb' b = 'aw elba' b = 'able was' b = 'ble was ' b = 'le was I' b = 'e was I ' b = ' was I e' b = 'was I er' b = 'as I ere' b = 's I ere ' b = ' I ere I' b = 'I ere I ' b = ' ere I s' b = 'ere I sa' b = 're I saw' b = 'e I saw ' b = ' I saw e' b = 'I saw el' b = ' saw elb' b = 'saw elba' b = 'able was ' b = 'ble was I' b = 'le was I ' b = 'e was I e' b = ' was I er' b = 'was I ere' b = 'as I ere ' b = 's I ere I' b = ' I ere I ' b = 'I ere I s' b = ' ere I sa' b = 'ere I saw' b = 're I saw ' b = 'e I saw e' b = ' I saw el' b = 'I saw elb' b = ' saw elba' b = 'able was I' b = 'ble was I ' b = 'le was I e' b = 'e was I er' b = ' was I ere' b = 'was I ere ' b = 'as I ere I' b = 's I ere I ' b = ' I ere I s' b = 'I ere I sa' b = ' ere I saw' b = 'ere I saw ' b = 're I saw e' b = 'e I saw el' b = ' I saw elb' b = 'I saw elba' b = 'able was I ' b = 'ble was I e' b = 'le was I er' b = 'e was I ere' b = ' was I ere ' b = 'was I ere I' b = 'as I ere I ' b = 's I ere I s' b = ' I ere I sa' b = 'I ere I saw' b = ' ere I saw ' b = 'ere I saw e' b = 're I saw el' b = 'e I saw elb' b = ' I saw elba' b = 'able was I e' b = 'ble was I er' b = 'le was I ere' b = 'e was I ere ' b = ' was I ere I' b = 'was I ere I ' b = 'as I ere I s' b = 's I ere I sa' b = ' I ere I saw' b = 'I ere I saw ' b = ' ere I saw e' b = 'ere I saw el' b = 're I saw elb' b = 'e I saw elba' b = 'able was I er' b = 'ble was I ere' b = 'le was I ere ' b = 'e was I ere I' b = ' was I ere I ' b = 'was I ere I s' b = 'as I ere I sa' b = 's I ere I saw' b = ' I ere I saw ' b = 'I ere I saw e' b = ' ere I saw el' b = 'ere I saw elb' b = 're I saw elba' b = 'able was I ere' b = 'ble was I ere ' b = 'le was I ere I' b = 'e was I ere I ' b = ' was I ere I s' b = 'was I ere I sa' b = 'as I ere I saw' b = 's I ere I saw ' b = ' I ere I saw e' b = 'I ere I saw el' b = ' ere I saw elb' b = 'ere I saw elba' b = 'able was I ere ' b = 'ble was I ere I' b = 'le was I ere I ' b = 'e was I ere I s' b = ' was I ere I sa' b = 'was I ere I saw' b = 'as I ere I saw ' b = 's I ere I saw e' b = ' I ere I saw el' b = 'I ere I saw elb' b = ' ere I saw elba' b = 'able was I ere I' b = 'ble was I ere I ' b = 'le was I ere I s' b = 'e was I ere I sa' b = ' was I ere I saw' b = 'was I ere I saw ' b = 'as I ere I saw e' b = 's I ere I saw el' b = ' I ere I saw elb' b = 'I ere I saw elba' b = 'able was I ere I ' b = 'ble was I ere I s' b = 'le was I ere I sa' b = 'e was I ere I saw' b = ' was I ere I saw ' b = 'was I ere I saw e' b = 'as I ere I saw el' b = 's I ere I saw elb' b = ' I ere I saw elba' b = 'able was I ere I s' b = 'ble was I ere I sa' b = 'le was I ere I saw' b = 'e was I ere I saw ' b = ' was I ere I saw e' b = 'was I ere I saw el' b = 'as I ere I saw elb' b = 's I ere I saw elba' b = 'able was I ere I sa' b = 'ble was I ere I saw' b = 'le was I ere I saw ' b = 'e was I ere I saw e' b = ' was I ere I saw el' b = 'was I ere I saw elb' b = 'as I ere I saw elba' b = 'able was I ere I saw' b = 'ble was I ere I saw ' b = 'le was I ere I saw e' b = 'e was I ere I saw el' b = ' was I ere I saw elb' b = 'was I ere I saw elba' b = 'able was I ere I saw ' b = 'ble was I ere I saw e' b = 'le was I ere I saw el' b = 'e was I ere I saw elb' b = ' was I ere I saw elba' b = 'able was I ere I saw e' b = 'ble was I ere I saw el' b = 'le was I ere I saw elb' b = 'e was I ere I saw elba' b = 'able was I ere I saw el' b = 'ble was I ere I saw elb' b = 'le was I ere I saw elba' b = 'able was I ere I saw elb' b = 'ble was I ere I saw elba' b = 'able was I ere I saw elba'

Suggested Problems

More from this Author95