Problem 46585. Beat the RNG - Passwords

Solution 2976400

Submitted on 21 Sep 2020 by Tim
  • Size: 51
  • 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
% Randomly generate 1024 alphanumeric strings rng('shuffle') alphanum = ['a':'z' 'A':'Z' '0':'9']; passwords = string(alphanum(randi([1 length(alphanum)], [1024 6]))); rng('shuffle') % x = passwords(8); y = get_all_passwords(x); assert(isequal(passwords,y))

Suggested Problems

More from this Author3

Community Treasure Hunt

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

Start Hunting!