diff --git a/C++/420-strong-password-checker.cpp b/C++/420-strong-password-checker.cpp new file mode 100644 index 0000000..f761bb9 --- /dev/null +++ b/C++/420-strong-password-checker.cpp @@ -0,0 +1,64 @@ +// 420-strong-password-checker.cpp +// Problem: https://leetcode.com/problems/strong-password-checker/ +// + +class Solution { +public: + int strongPasswordChecker(string password) { + int x = password.size(); + bool lower = false; + bool upper = false; + bool digit = false; + + for(char i:password){ + if(islower(i)){ + lower = true; + } + if (isupper(i)){ + upper = true; + } + if(isdigit(i)){ + digit = true; + } + } + + int miss = !lower + !upper + !digit; + int change = 0; + int one = 0; + int two = 0; + + for (int i =2;i(add all links to your profiles eg on Hackerrank, Codechef, LeetCode...) | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Genji J](https://github.com/anya-minamoto)
| Indonesia | C++ | [GitHub](https://github.com/anya-minamoto)
[LeetCode](https://leetcode.com/u/anya-minamoto/) | | [Gourav R](https://github.com/GouravRusiya30/)
| India | Java | [codedecks](https://www.youtube.com/c/codedecks/)
[Hackerrank](https://www.hackerrank.com/gouravrusiya786)
[LeetCode](https://leetcode.com/rusiya/) | | [Dima Vishnevetsky](https://github.com/dimshik100)
| Israel | JavaScript | [Twitter](https://twitter.com/dimshik100)
[Facebook](https://www.facebook.com/dimshik) | | [Anuj Sharma](https://github.com/Optider/)
| India | Python | [Github](https://github.com/Optider) |