Cody

Solution 1422083

Submitted on 22 Jan 2018 by baruch braude
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
sentence = 'this is BETTER than C++'; corrected = 'This Is Better Than C++'; assert(isequal(autoCase(sentence), corrected))

new = [] sentence = 'This is BETTER than C++' N = 'h' new = 'h' N = 'i' new = 'hi' N = 's' new = 'his' N = ' ' new = 'his ' N = 'I' new = 'his I' N = 's' new = 'his Is' N = ' ' new = 'his Is ' N = 'B' new = 'his Is B' N = 'e' new = 'his Is Be' N = 't' new = 'his Is Bet' N = 't' new = 'his Is Bett' N = 'e' new = 'his Is Bette' N = 'r' new = 'his Is Better' N = ' ' new = 'his Is Better ' N = 'T' new = 'his Is Better T' N = 'h' new = 'his Is Better Th' N = 'a' new = 'his Is Better Tha' N = 'n' new = 'his Is Better Than' N = ' ' new = 'his Is Better Than ' N = 'C' new = 'his Is Better Than C' N = '+' new = 'his Is Better Than C+' N = '+' new = 'his Is Better Than C++' corrected = 'This Is Better Than C++'

2   Pass
sentence = 'hEy, tHis iS vErY wroNg!'; corrected = 'Hey, This Is Very Wrong!'; assert(isequal(autoCase(sentence), corrected))

new = [] sentence = 'HEy, tHis iS vErY wroNg!' N = 'e' new = 'e' N = 'y' new = 'ey' N = ',' new = 'ey,' N = ' ' new = 'ey, ' N = 'T' new = 'ey, T' N = 'h' new = 'ey, Th' N = 'i' new = 'ey, Thi' N = 's' new = 'ey, This' N = ' ' new = 'ey, This ' N = 'I' new = 'ey, This I' N = 's' new = 'ey, This Is' N = ' ' new = 'ey, This Is ' N = 'V' new = 'ey, This Is V' N = 'e' new = 'ey, This Is Ve' N = 'r' new = 'ey, This Is Ver' N = 'y' new = 'ey, This Is Very' N = ' ' new = 'ey, This Is Very ' N = 'W' new = 'ey, This Is Very W' N = 'r' new = 'ey, This Is Very Wr' N = 'o' new = 'ey, This Is Very Wro' N = 'n' new = 'ey, This Is Very Wron' N = 'g' new = 'ey, This Is Very Wrong' N = '!' new = 'ey, This Is Very Wrong!' corrected = 'Hey, This Is Very Wrong!'

Suggested Problems

More from this Author25