Cody

# Problem 1721. Backslang, odds are you used it at some point in time...

Solution 573144

Submitted on 3 Feb 2015 by goc3
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
%% str = 'The sky is falling, the sky is falling, or is it?' output = 'Hetay kysay siay allingfay, hetay kysay siay allingfay, roay siay tiay?' assert(isequal(backslang(str),output))

str = The sky is falling, the sky is falling, or is it? output = Hetay kysay siay allingfay, hetay kysay siay allingfay, roay siay tiay? c1 = t c2 = ? c1 = i c2 = t c1 = c2 = i c1 = s c2 = c1 = i c2 = s c1 = c2 = i c1 = r c2 = c1 = o c2 = r c1 = c2 = o c1 = , c2 = c1 = g c2 = , c1 = n c2 = g c1 = i c2 = n c1 = l c2 = i c1 = l c2 = l c1 = a c2 = l c1 = f c2 = a c1 = c2 = f c1 = s c2 = c1 = i c2 = s c1 = c2 = i c1 = y c2 = c1 = k c2 = y c1 = s c2 = k c1 = c2 = s c1 = e c2 = c1 = h c2 = e c1 = t c2 = h c1 = c2 = t c1 = , c2 = c1 = g c2 = , c1 = n c2 = g c1 = i c2 = n c1 = l c2 = i c1 = l c2 = l c1 = a c2 = l c1 = f c2 = a c1 = c2 = f c1 = s c2 = c1 = i c2 = s c1 = c2 = i c1 = y c2 = c1 = k c2 = y c1 = s c2 = k c1 = c2 = s c1 = e c2 = c1 = h c2 = e c1 = T c2 = h str = the sky is falling, the sky is falling, or is it? str = tHe sky is falling, the sky is falling, or is it? str = Hetay kysay siay allingfay, hetay kysay siay allingfay, roay siay tiay?

2   Pass
%% str = 'If Allen is Janes husband and Tom is Jill husband, who is Roys wife?' output = 'Fiay Llenaay siay Anesjay usbandhay ndaay Omtay siay Illjay usbandhay, howay siay Oysray ifeway?' assert(isequal(backslang(str),output))

str = If Allen is Janes husband and Tom is Jill husband, who is Roys wife? output = Fiay Llenaay siay Anesjay usbandhay ndaay Omtay siay Illjay usbandhay, howay siay Oysray ifeway? c1 = e c2 = ? c1 = f c2 = e c1 = i c2 = f c1 = w c2 = i c1 = c2 = w c1 = s c2 = c1 = y c2 = s c1 = o c2 = y c1 = R c2 = o str = If Allen is Janes husband and Tom is Jill husband, who is roys wife? str = If Allen is Janes husband and Tom is Jill husband, who is rOys wife? c1 = c2 = r c1 = s c2 = c1 = i c2 = s c1 = c2 = i c1 = o c2 = c1 = h c2 = o c1 = w c2 = h c1 = c2 = w c1 = , c2 = c1 = d c2 = , c1 = n c2 = d c1 = a c2 = n c1 = b c2 = a c1 = s c2 = b c1 = u c2 = s c1 = h c2 = u c1 = c2 = h c1 = l c2 = c1 = l c2 = l c1 = i c2 = l c1 = J c2 = i str = If Allen is Janes husband and Tom is jill husband, who is rOys wife? str = If Allen is Janes husband and Tom is jIll husband, who is rOys wife? c1 = c2 = j c1 = s c2 = c1 = i c2 = s c1 = c2 = i c1 = m c2 = c1 = o c2 = m c1 = T c2 = o str = If Allen is Janes husband and tom is jIll husband, who is rOys wife? str = If Allen is Janes husband and tOm is jIll husband, who is rOys wife? c1 = c2 = t c1 = d c2 = c1 = n c2 = d c1 = a c2 = n c1 = c2 = a c1 = d c2 = c1 = n c2 = d c1 = a c2 = n c1 = b c2 = a c1 = s c2 = b c1 = u c2 = s c1 = h c2 = u c1 = c2 = h c1 = s c2 = c1 = e c2 = s c1 = n c2 = e c1 = a c2 = n c1 = J c2 = a str = If Allen is janes husband and tOm is jIll husband, who is rOys wife? str = If Allen is jAnes husband and tOm is jIll husband, who is rOys wife? c1 = c2 = j c1 = s c2 = c1 = i c2 = s c1 = c2 = i c1 = n c2 = c1 = e c2 = n c1 = l c2 = e c1 = l c2 = l c1 = A c2 = l str = If allen is jAnes husband and tOm is jIll husband, who is rOys wife? str = If aLlen is jAnes husband and tOm is jIll husband, who is rOys wife? c1 = c2 = a c1 = f c2 = c1 = I c2 = f str = if aLlen is jAnes husband and tOm is jIll husband, who is rOys wife? str = iF aLlen is jAnes husband and tOm is jIll husband, who is rOys wife? str = Fiay Llenaay siay Anesjay usbandhay ndaay Omtay siay Illjay usbandhay, howay siay Oysray ifeway?

3   Pass
%% str = 'This is the sentence I will use.' output = 'Histay siay hetay entencesay Iay illway seuay.' assert(isequal(backslang(str),output))

str = This is the sentence I will use. output = Histay siay hetay entencesay Iay illway seuay. c1 = e c2 = . c1 = s c2 = e c1 = u c2 = s c1 = c2 = u c1 = l c2 = c1 = l c2 = l c1 = i c2 = l c1 = w c2 = i c1 = c2 = w c1 = I c2 = c1 = c2 = I c1 = e c2 = c1 = c c2 = e c1 = n c2 = c c1 = e c2 = n c1 = t c2 = e c1 = n c2 = t c1 = e c2 = n c1 = s c2 = e c1 = c2 = s c1 = e c2 = c1 = h c2 = e c1 = t c2 = h c1 = c2 = t c1 = s c2 = c1 = i c2 = s c1 = c2 = i c1 = s c2 = c1 = i c2 = s c1 = h c2 = i c1 = T c2 = h str = this is the sentence I will use. str = tHis is the sentence I will use. str = Histay siay hetay entencesay Iay illway seuay.

4   Pass
%% str = 'Christopher Columbus sailed the ocean blue!' output = 'Hristophercay Olumbuscay ailedsay hetay ceanoay luebay!' assert(isequal(backslang(str),output))

str = Christopher Columbus sailed the ocean blue! output = Hristophercay Olumbuscay ailedsay hetay ceanoay luebay! c1 = e c2 = ! c1 = u c2 = e c1 = l c2 = u c1 = b c2 = l c1 = c2 = b c1 = n c2 = c1 = a c2 = n c1 = e c2 = a c1 = c c2 = e c1 = o c2 = c c1 = c2 = o c1 = e c2 = c1 = h c2 = e c1 = t c2 = h c1 = c2 = t c1 = d c2 = c1 = e c2 = d c1 = l c2 = e c1 = i c2 = l c1 = a c2 = i c1 = s c2 = a c1 = c2 = s c1 = s c2 = c1 = u c2 = s c1 = b c2 = u c1 = m c2 = b c1 = u c2 = m c1 = l c2 = u c1 = o c2 = l c1 = C c2 = o str = Christopher columbus sailed the ocean blue! str = Christopher cOlumbus sailed the ocean blue! c1 = c2 = c c1 = r c2 = c1 = e c2 = r c1 = h c2 = e c1 = p c2 = h c1 = o c2 = p c1 = t c2 = o c1 = s c2 = t c1 = i c2 = s c1 = r c2 = i c1 = h c2 = r c1 = C c2 = h str = christopher cOlumbus sailed the ocean blue! str = cHristopher cOlumbus sailed the ocean blue! str = Hristophercay Olumbuscay ailedsay hetay ceanoay luebay!