Ad
  • Custom User Avatar

    Hi, Is it possible to work on two different languages at the same time? Meaning have a different kata ranking for each language, so that you can tackle different level's of problems for each language? And then if you complete a kata for one language, would it show it's completed for the other language?

  • Custom User Avatar

    I really thought my solution would be much faster because I don't use pow at all, I just use a few modulus operations for each subroutine call, but my solution doesn't seem any faster (maybe slower). :)

    Whoever implement the pow funtion did an amazing job!!!

  • Custom User Avatar

    Your solution was similar to mine, but I like yours better (your approach to create the initial string was more straightforward)

  • Custom User Avatar

    This is the fastest solution I spotted so far, since I believe it is O(n). It does not do any comparisons, just counts the number of 0's, 4's, 9's, 6's as it inspects the string in basically one pass. Most of the solutions which compare between all the different combinations would be much slower, right? Please let me know if I'm wrong. (of course, this solution would probably require more memory, if that is a consideration)

  • Custom User Avatar

    he means -2 + 1 = -1, this sum is less than 6,
    the largest sum (when adding adjacent indices is 6 = 4 + (-1) + 2 + 1)