You are given a string s of even length. Split it into two halves of equal length, a (the first half) and b (the second half). Two strings are alike if they contain the same number of vowels (a, e, i, o, u, in either case). Return true if a and b are alike, and false otherwise.
You are given a string s of even length. Split it into two halves of equal length, a (the first half) and b (the second half). Two strings are alike if they contain the same number of vowels (a, e, i, o, u, in either case). Return true if a and b are alike, and false otherwise.
Example 1:
Input: {"s":"book"}
Output: true
Constraints:
2≤s.length≤1000
s.length is even.
s consists of uppercase and lowercase letters.
Test Cases
Input (Stdin)
Expected Output (Stdout)
Execution Result
Run code to see results.
Input
arr ={"s":"book"}
len(s) = 4, so cut it at half = 2: a = "bo" and b = "ok".