Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Good point. I updated the description.

  • Custom User Avatar

    I respect your opinion.

    For many people, this problem has appropriate wording, while for others it's misinterpreted. In real-world scenarios, being able to reach out and discuss with others and doing investigation is what makes a difference between a substandard and a great developer.

  • Custom User Avatar

    There is no reason the discussion forums should be a required reading material instead of proper wording.

  • Default User Avatar

    Nice kata, just a small hint for people who are getting timeouts:
    A simple depth first search of breadth first search won't work. Timeout tests are designed to eliminate them.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    You share a similar concern that has been brought up and explained several times in the Discussion, but one of the key reasons I've decided to leave the prompt as-is comes down to this: the language used in this problem is the closest to what I was given during my interview for the company I work at now. Talking with the interviewer and getting more details on the specification that I was unclear about is just as valuable a skill as knowing how to code up a solution is, and since the Discussion posts serve as an informal documentation of sorts, having users who aren't certain of their understanding of a problem learning to supplement it with research is an additional lesson they can gain while working on this problem.

  • Default User Avatar

    The question is a bit vague about the "entire pair is earlier" part. As I understand a pair is earlier than another one if the indice of the element at right is smaller. Thus the answer to [10, 5, 2, 3, 7, 5] is [3, 7] instead of [5, 5] because 7 comes before the second 5. The question should be updated for a clarification.