Gridland Metro

  • + 2 comments

    It's always good to validate your assumptions but, for the purposes of the problems here, you can always assume that the input will be valid as described in the problem statement.

    It sounds like you're close, but you may be misunderstanding the problem somehow or making an unjustified assumption.

    When you say "overlaping ... sets of intervals ... on different rows" I assume you mean overlaps on the same row, for each row, otherwise I don't think you would have gotten that far.

    It also sounds like you're handling more than two ranges overlapping, but have you considered that the ranges may not be specified in any particular order?