The first line contains an Integer 'T' which denotes the number of test cases or queries to be run. Then the test cases follow.
The first line of each test case consists of a string ‘S’ which denotes the IFSC Code.
For each test case print ‘True’ if the IFSC code is valid otherwise print ‘False’.
Output for each test case will be printed in a separate line.
You are not required to print anything, it has already been taken care of. Just implement the function.
1 <= T <= 10
1 <= |S| <= 100
Time Limit: 1 sec
To check whether the string is a valid IFSC Code or not we can check every character of the string explicitly and check whether the string is in the correct format or not.
Algorithm:-
To check whether the string is a valid IFSC Code first create a regular expression and match the given string with the regular expression.
The regular expression should be constructed as {^[A - Z] {4} 0 [A - Z0 - 9] {6} $} :-
Algorithm:-
Divisible Substrings
Ninja and Numbers
Longest Palindromic Substring
Cakes
1-3 Palindrome