You will create a function which takes a matrix filled with letters from the alphabet and determine if a
2x2 square composed of vowels exists.
If a 2x2 square of vowels is found, your function should return the top-left position (row-column) of the square.
If no 2x2 square of vowels exists, then return the string
If there are multiple squares of vowels, return the one that is at the most top-left position in the whole matrix.
- Matrix must be at least
- Matrix can only contain letters from the alphabet
- Input can be a String, where each line is separated by
\tTAB) or an array of strings.
- Vowels are
a e i o u.
["abcd", "eikr", "oufj"]
a b c d e i k r o u f j
g g f f
["asd", "qie", "euo"]
a s d q i e e u o
["aqrst", "ukaei", "ffooo"]
a q r s t u k a e i f f o o o
["ghsdfhsd", "sdfgsdff", "sdfgsdfg"]
g h s d f h s d s d f g s d f f s d f g s d f g
- Consider the examples as test cases as well
- If you are going to use 1-based index, please clarify it in your answer.
This is code-golf, so the shortest answer in bytes win.