p
Fill your code here
Ray joined the security force of Coders Club. To test his wit, the members decided to give
a puzzle. Ray is given n strings each of length m. Each string has a pointer which initially
points the first character of corresponding string. Ray has to create a password of length n
using the characters pointed by the pointers in the strings. The password must follow the
following conditions:
1 int Findlength
2- int main() {
3 char str[10
4
int length;
5
printf("\n
6
gets(str);
7
8 }
9
There is at least one digit in the string,
There is at least one lowercase (small) letter of the Latin alphabet in the string,
There is at least one of three listed symbols in the string: '#','*, '&'.
Ray is allowed to perform only one type of operation. In one operation he can shift the
pointer of any one string to either left or right by one character.( the pointer are cyclic in
nature le the left of the first character is the last character of the string).
Since Ray wants to pass this test, he asks your help. You need to determine the minimum
number of operations required to make a password following the above conditions.
Input format
Answers
Answer:
Fill your code here
Ray joined the security force of Coders Club. To test his wit, the members decided to give
a puzzle. Ray is given n strings each of length m. Each string has a pointer which initially
points the first character of corresponding string. Ray has to create a password of length n
using the characters pointed by the pointers in the strings. The password must follow the
following conditions:
1 int Findlength
2- int main() {
3 char str[10
4
int length;
5
printf("\n
6
gets(str);
7
8 }
9
There is at least one digit in the string,
There is at least one lowercase (small) letter of the Latin alphabet in the string,
There is at least one of three listed symbols in the string: '#','*, '&'.
Ray is allowed to perform only one type of operation. In one operation he can shift the
pointer of any one string to either left or right by one character.( the pointer are cyclic in
nature le the left of the first character is the last character of the string).
Since Ray wants to pass this test, he asks your help. You need to determine the minimum
number of operations required to make a password following the above conditions.
Input format