• + 3 comments

    I am desperatly close to completition. I am using connected components to find the number of days required to solve the problems. I create a graph based on the constraints. My algorithm works for smaller data sets N < lets say. This is not concrete but seems to be the general happenings. This is why I cant figure out whats wrong. Not only is it impossible (nearly so) to work out the solutions to large data sets on paper usign my algorithm, I dont understand why it not only works for what seems to be smaller data sets but comes desperatly close for all the others, as in off by only a few for wrong answers. I dont know what could possible be wrong. I can give more details if any body can be bothered helping me. This would be my first problem on hacker rank being solved and would greatly motivate me to solve more, I just need to put away one first . So somebody help me??

    • HackerRank Admin
      + 1 comment

      Did you know you can download the test-cases using hackos?

      • + 0 comments

        It'd be useful if you could use those as custom input, but there is a 50KB input limit...

    • + 0 comments

      Hi @jporcelli, I am stuck at the question. Can you explain how did u solve the question? I am checking every number with the numbers following it with complexity O(n^2).For some cases i am getting right answer but wrong for others.What is the key point in question?

    • + 0 comments

      @jporcelli I don't think you can use connected components. It'll find all possible paths from a starting vertex. You have to find one path per iteration.