Ad
  • Custom User Avatar

    Yeah, this helps. Thank you very much!

  • Custom User Avatar

    ok i have changed it again hopefully its a bit clearer this time

  • Custom User Avatar

    "The unique position is the position of every different word in the sentence, which excludes repeated words"

    i was going to add this, do you reckon that's a good explanation? give suggestions if you have a better idea

    i want to keep it short and concise whilst not being too complex to understand

  • Custom User Avatar

    Ah ye, this kata was updated by someone else
    ill fix it when im home i promise

  • 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

    either you said the same thing as the wording
    or
    i have no clue what you just said

    please simplify what you just said, i cant comprehend it :(

  • 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.