Ad
  • Custom User Avatar
  • Custom User Avatar

    Because your regex only matches when there is at least one letter after the apostroph.

  • Custom User Avatar

    For 3. you need to be careful with case-sensitivity. Substrings are not counted as occurrences.

  • Custom User Avatar

    Ahhh, thank you, Madjosz! For some reason my brain was interpreting "ties" as words being tied together that need to be broken/split up. This makes so much more sense now!

  • Custom User Avatar

    1./2. "Tie" means words occuring equal amount of times. "arbitrarily broken" means you can return any one of them.

  • Custom User Avatar

    Hi all! I have some questions about the requirements that have to be met:

    1. What does "Ties may be broken arbitrarily" mean exactly? What are ties in this context and how can they be broken (arbitrarily)? Could you give an example?
    2. In what order should we return words which occur an equal amount of times? / Does the order matter?
    3. It seems like my solution is failing on the random tests (partly?) because substrings of what I assumed to be words already count as words. Does a word not have to be enclosed by whitespaces to be a word? So is e.g. the simple string 'a' already a valid word and would therefore be counted 3 times in the text "a shadow in the dark"?
      I apologize for repeating questions which have been asked before by members of the community. Unfortunately, I was not able to find satisfactory answers to those questions. Thanks for your help :)