Cody

Problem 45387. Anagram

Solution 2190496

Submitted on 3 Apr 2020 by Jiahang Li
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
assert(isequal(anagram("rail safety","fairy tales"),1))

ans = logical 1

2   Pass
assert(isequal(anagram("McDonald's restaurants","Uncle Sam's standard rot"),1))

ans = logical 1

3   Pass
assert(isequal(anagram("aaabbccd","abbccddd"),0))

ans = logical 0

4   Pass
assert(isequal(anagram("2343636","42343636"),0))

ans = logical 0

5   Pass
assert(isequal(anagram("New York Times","Men's write coy"),0))

ans = logical 0

6   Pass
assert(isequal(anagram("Justin Timberlake","I'm a jerk but listen"),1))

ans = logical 1

7   Pass
assert(isequal(anagram("222233344441","122223334444"),1))

ans = logical 1

8   Pass
assert(isequal(anagram("Tom Marvolo Riddle","I'm Lord Voldemort"),0))

ans = logical 0

Suggested Problems

More from this Author149

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!