Ad
  • Custom User Avatar

    it dont make sense. what if the array has 100M and the 1st item is the largest one?

  • Custom User Avatar

    Great kata, loved this one! Really makes you think

  • Custom User Avatar

    damn. this kata is relative hard. I don't think that is 7 kyu...

  • Default User Avatar
  • Custom User Avatar

    Wow, I've completed 3kyu's I've had less trouble on. Was hoping to do a quick puzzle before bed but stayed up half the night trying to figure out what I was missing. My misconceptions before I started googling around were:

    1. That the fib%n sequence can be calculated the same as the fib sequence. I spent resources tracking the fib sequence in all its glory,
      and then modularing that answer to get the %n sequence.

    2. That in the thousands of numbers in a sequence, 0,1 will never repeat itself within the sequence. Spent a lot of
      time trying different comparison depths, first tracking that the whole sequence repeats itself at least 3 times, then twice,
      then that 10 numbers repeat, that 5 numbers repeat... all of which worked but were too slow. Even scanning through the wiki it
      never specifies that 0,1 was guaranteed to never repeat itself, unless I missed it.

    I agree with some of the previous comments about this getting a performance tag although I've seen your previous agruments for why not. Being ranked 7kyu I also wonder if the above were problems for others, and that maybe there should be hints regarding the above, but perhaps that gives too much away.

  • Default User Avatar

    thank you

  • Default User Avatar

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

  • Custom User Avatar

    from wiki: all cycles start with (0, 1)

  • Custom User Avatar

    yes, this one is too slow, even for 7 kyu :) you should refactor that second "if" statement, it is extremely slow

  • Default User Avatar

    do Pisano periods contain subsequences that themselves ever repeat sequentially?

  • Custom User Avatar

    appreuved

  • Custom User Avatar
  • Custom User Avatar

    My initial reaction was "I have a solution ?!?", but apparently I do. Then I saw the other solutions. ( Then I had to read the description, because I did not actually remember the task. )

    There are levels of naiveté.

    There definitely are levels of naiveté. :O

    Anyway, thanks.

  • Custom User Avatar

    Your solution now passes.

  • Custom User Avatar

    I'll lower the limit to pass your solution as well.

  • Loading more items...