Ad
  • Custom User Avatar

    Yeah, this helps. Thank you very much!

  • Custom User Avatar

    Hey man! Sorry. Here's the example of what I mean:
    The test phrase The number 0 is such a strange number Strangely it has zero meaning

    • Regarding the AC the "Strangely" index is 8
    • Regarding the solution(s) the "Strangely" index is 7

    This happens due to the discrepancy of implementation and acceptance criteria:

    1. In AC we're suggested to add an index of an original sentence (as I read it)

    2. In acceptable solution to pass tests we:

      a. condense the sentense to unique set of strings;
      b. return indexes of those

    Which, in turn eliminates the repetition of the word "number" from the sentense making the index of "Strangely" = 7

    P.S. I am referring to a last assertion in "Basic tests" for the excersise.

  • Custom User Avatar

    The issue here is that Acceptance Criteria provide the wording as
    If a word appears more than once in the sentence, your string should return the position of the first occurrence of the word.
    so you tend to reference the original sentence.

    Meanwhile tests and solutions show, that the "correct" approach is to treat and refer to the 1st occurance in condensed (no repetitions) array of words, which, coincidently, is expected to have the inherited order of the initial sentense.