Solution 2083350

Submitted on 8 Jan 2020 by Asif Newaz
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
x = 'this is a sentence'; y_correct = 'sentence a is this'; assert(isequal(strRevert(x),y_correct))

a = 1×4 cell array {'this'} {'is'} {'a'} {'sentence'} b = 1×4 cell array {'sentence'} {'a'} {'is'} {'this'} c = 'sentence a is this'

2   Pass
x = 'lala tralala'; y_correct = 'tralala lala'; assert(isequal(strRevert(x),y_correct))

a = 1×2 cell array {'lala'} {'tralala'} b = 1×2 cell array {'tralala'} {'lala'} c = 'tralala lala'

Suggested Problems

More from this Author25