Cody

Solution 504490

Submitted on 24 Sep 2014 by James
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
%% Test 1 textIn1 = strcat('I am having a great time at summer camp. The camp', ... ' counselors are great and the activities are great. Monday', ... ' we went kayaking and Tuesday we learned archery. Archery was', ... ' great and I hit the bull''s eye which everyone was said was', ... ' really great. -Love Johnny'); textOut1 = strcat('I am having a great time at summer camp. The camp', ... ' counselors are great and the activities are awesome. Monday', ... ' we went kayaking and Tuesday we learned archery. Archery was', ... ' great and I hit the bull''s eye which everyone was said was', ... ' really awesome. -Love Johnny'); assert(strcmp(improve(textIn1),textOut1))

s = Columns 1 through 3 'I am having a gr...' ' The camp counse...' ' Monday we went ...' Columns 4 through 5 ' Archery was gre...' ' -Love Johnny' temp = 'I' 'am' 'having' 'a' 'great' 'time' 'at' 'summer' 'camp' gcount = 1 temp = Columns 1 through 9 '' 'The' 'camp' 'counselors' 'are' 'great' 'and' 'the' 'activities' Columns 10 through 11 'are' 'great' gcount = 1 gcount = 2 temp = Columns 1 through 9 '' 'The' 'camp' 'counselors' 'are' 'great' 'and' 'the' 'activities' Columns 10 through 11 'are' 'awesome' temp = Columns 1 through 9 '' 'Monday' 'we' 'went' 'kayaking' 'and' 'Tuesday' 'we' 'learned' Column 10 'archery' temp = Columns 1 through 10 '' 'Archery' 'was' 'great' 'and' 'I' 'hit' 'the' 'bull's' 'eye' Columns 11 through 17 'which' 'everyone' 'was' 'said' 'was' 'really' 'great' gcount = 1 gcount = 2 temp = Columns 1 through 10 '' 'Archery' 'was' 'great' 'and' 'I' 'hit' 'the' 'bull's' 'eye' Columns 11 through 17 'which' 'everyone' 'was' 'said' 'was' 'really' 'awesome' temp = '' '-Love' 'Johnny' ans = I am having a great time at summer camp. The camp counselors are great and the activities are awesome. Monday we went kayaking and Tuesday we learned archery. Archery was great and I hit the bull's eye which everyone was said was really awesome. -Love Johnny

2   Pass
%% Test 2 textIn2 = strcat('This sentence has great twice, which is great.'); textOut2 = strcat('This sentence has great twice, which is awesome.'); assert(strcmp(improve(textIn2),textOut2))

s = 'This sentence has great twice, which is ...' '' temp = 'This' 'sentence' 'has' 'great' 'twice,' 'which' 'is' 'great' gcount = 1 gcount = 2 temp = 'This' 'sentence' 'has' 'great' 'twice,' 'which' 'is' 'awesome' temp = {''} ans = This sentence has great twice, which is awesome.

3   Pass
%% Test 3 textIn3 = strcat('Summer camp this year has been so great and I have', ... ' made so many great friends. I will treasure the great memories', ... ' and great times forever. It was truly an awesome time.'); textOut3 = strcat('Summer camp this year has been so great and I have', ... ' made so many awesome friends. I will treasure the great memories', ... ' and awesome times forever. It was truly an awesome time.'); assert(strcmp(improve(textIn3),textOut3))

s = 'Summer camp this...' ' I will treasure...' ' It was truly an...' '' temp = Columns 1 through 10 'Summer' 'camp' 'this' 'year' 'has' 'been' 'so' 'great' 'and' 'I' Columns 11 through 16 'have' 'made' 'so' 'many' 'great' 'friends' gcount = 1 gcount = 2 temp = Columns 1 through 10 'Summer' 'camp' 'this' 'year' 'has' 'been' 'so' 'great' 'and' 'I' Columns 11 through 16 'have' 'made' 'so' 'many' 'awesome' 'friends' temp = Columns 1 through 9 '' 'I' 'will' 'treasure' 'the' 'great' 'memories' 'and' 'great' Columns 10 through 11 'times' 'forever' gcount = 1 gcount = 2 temp = Columns 1 through 9 '' 'I' 'will' 'treasure' 'the' 'great' 'memories' 'and' 'awesome' Columns 10 through 11 'times' 'forever' temp = '' 'It' 'was' 'truly' 'an' 'awesome' 'time' temp = {''} ans = Summer camp this year has been so great and I have made so many awesome friends. I will treasure the great memories and awesome times forever. It was truly an awesome time.