Problem 2394. Permutation

Solution 2885597

Submitted on 28 Aug 2020 by Rafael S.T. Vieira
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 = 'sandy'; y_correct = 120; assert(isequal(perm(x),y_correct))

2   Pass
x= 'sandeep'; y_correct = 2520; assert(isequal(perm(x),y_correct))

3   Pass
x='mathematics'; y_correct=4989600; assert(isequal(perm(x),y_correct))

4   Pass
x='abbcccdddd'; y_correct=12600; assert(isequal(perm(x),y_correct))

Suggested Problems

More from this Author1

Community Treasure Hunt

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

Start Hunting!