Ad
  • Custom User Avatar

    It's not clear what you call an O(n) complexity. There's a well known math algorithm to solve that, you obviously don't need to iterate all values until finding the solution. Please don't post issues like that, just because you can't solve a kata the way you would like.