WIERDO: Can anyone help me why I am getting TLE?


basic idea is

  1. Am checking all the 3 length subarrays to check if any of them have consonants count > vowel count. If yes, then tagging it as BOB. Else ALICE
  2. While doing step-1, am maintaining a dict to keep track of freq of charecters and about charecters present.
  3. Then calling getScore func. Here, for every character am getting num/denom. and multiplying all such number.

However, I am getting TLE even for subTask-1, could anyone pls help?

Thanks in advance!