You are provided with 2-D Matrix, A, such that
1. A (MxN), is 2-Dimensional Matrix
2. A[i][j] E [A-Z]
you have to find the smallest sub square matrix, such that
it contains all the vowels i.e. {A E, I, O, U}.
Input: A[][] ->
A E I O B 1 2 3 4 5
C D U Z O 6 7 8 9 10
P O A E K 11 12 13 14 15
B R E A K 16 17 18 19 20
Possible Outputs:
A E I 1 2 3
C D U 5 6 7
P O A 9 10 11
I O B 3 4 5
U Z O 8 9 10
A E K 13 14 15
so, size here will be 3x3 square matrix, so it is 3.
Please help me to find out the logic behind this problem.