Ad
  • Custom User Avatar

    10K++ people passed. You should opt for an O(N) approach, O(N^2) with more than 1 loop iteration may time out.

  • Custom User Avatar

    Unfortunately, 652 is not a perfect square (sqrt(652) ≈ 25.5342907), whereas 625 is (625 = 25 * 25). The correct answer to return here is 625.

  • Custom User Avatar

    Your code fails to take into account when only the first letter of the word is in lowercase & the rest is uppercase:

    tBAWJUB becomes TBAWJUB => Technically not an acronym, but first letter of the first word of a sentence should be uppercased.

  • Default User Avatar
  • Custom User Avatar

    As you iterate through your list (text here),
    you are conditionally removing elements from the list.
    This will result in unpredictable behaviour.

    If removal is necessary, iterate over a copy of the list
    or use techniques such as iterating backwards
    to avoid index shifting issues.