You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, the explanation is here : https://youtu.be/t0O-Knlq4lQ
char getNature(char c){ if(c >= '0' && c <='9') return 'n'; if(c >= 'a' && c <= 'z') return 'l'; if(c >= 'A' && c <= 'Z') return 'u'; return 's'; } int minimumNumber(int n, string password) { map<char, int> mp; for(char c: password){ mp[getNature(c)] = 1; } return max(4 - (int)mp.size(), 6 - n); }
Seems like cookies are disabled on this browser, please enable them to open this website
Strong Password
You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, the explanation is here : https://youtu.be/t0O-Knlq4lQ