Cody

Problem 2394. Permutation

Solution 464109

Submitted on 29 Jun 2014 by J.R.! Menzinger
  • Size: 19
  • This is the leading solution.
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))

ans = 120

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

ans = 2520

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))

ans = 12600

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!