![]() |
VOOZH | about |
Given an integer N, the task is to generate random passwords of length N of easy, medium and strong level each.
Easy level Password: Consists of only numbers or letters. Medium level Password: Consists of Letters as well as numbers. Strong level Password - Consists of Letters, numbers, and/or special characters.
Examples:
Input: N = 5 Output: Easy level password (only numbers): 98990 Easy password (only letters): tpFEQ Medium level password: b3bC8 Strong level password: 7`74n Input: N = 7 Output: Easy level password (only numbers): 7508730 Easy level password (only letters): mDzKCjN Medium level password: 4Z05s66 Strong level password: 2384Qu9
Approach: Follow the steps below to solve the problem:
Below is the implementation of the above approach:
Easy level password (only numbers): 11973 Easy level password (only letters): AZYnW Medium level password: oo7c6 Strong level password: ,5Cc4
Time Complexity: O(N)
Auxiliary Space: O(N)