Ad
  • Custom User Avatar

    Amazing kata! It took me ages to pass the tests for large numbers. And when I checked out the solutions, I couldn’t believe my eyes, so simple!

  • Custom User Avatar

    Same thing happened to me. Looks like two order iteration is too much to pass the 10th test because n is such a large number. I think you should try reducing the number of iterations. When n is big, there are a lot of combinations you don’t really need to consider. This will make your algorithm more efficient.