Ad
  • Custom User Avatar
  • Default User Avatar

    I have no idea what I'm doing. I feel pretty stupid that I can't solve a 7kyu. What is wrong with me that I don't understand this? Any ideas?

  • Default User Avatar

    Without knowing specifics for your solution, It'll be tough to comment. Furthermore, the challenge of this kata, as denoted by the tag, is that it's a puzzle, more so that a programming exercise.

    If you havent already, try getting out a pen and paper, and workout a few examples, and try and spot a pattern.
    Also, you are tasked to find the value for f(n), so try to be deliberate on this intermidiate value. Keep this in your mind, when looking for patterns.

    Anymore than this, unfortunately will give away too much, and I don’t want to rob you of the satisfaction when you finally solve this!

  • Default User Avatar

    I'm failing two of the basic tests, the ones for f(f(5)) and f(f(10)). Any advice?

  • Default User Avatar

    please remember to use the spoiler flag when discussing code, otherwise anyone can see it on the dashboard. I have activated the flag for your comment just now. also, please mind your unnecessarily terse language, thank you.

  • Default User Avatar

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

  • Custom User Avatar

    Just copy them from the description ;-)

  • Default User Avatar

    How do you even create the characters?

  • Default User Avatar
  • Default User Avatar

    closing this issue as a duplicate, to keep the newer one that mentions JS as well

  • Default User Avatar

    done, but this is pointless, there are still many loopholes

  • Default User Avatar

    Node versions will not be restricted. The point of the kata is to implement the algorithm yourself, this is why it is 4-kyu, if you do not want to do that, skip the kata. It is a known issue that the JS version is not cheat-proof (see issues below). Completely disabling a built-in is very hard on Codewars, this kata should never have had a JS version to start with. Hopefully someday the JS version can be nuked, but I believe it is not currently possible to do that.

  • Custom User Avatar

    it's weird because it's the same number of digits

    You assume that computer sees numbers as digits the same way as you do. For computer, it;s not the same number of digits. The 11 which got lost is exactly the digits which did not fit into the place where the number is located.

  • Custom User Avatar

    Do NOT use parseInt, that's the whole point of this kata. This has nothing to do with JavaScript and the only "issue" is on your end.

  • Default User Avatar

    it's weird because it's the same number of digits, but the answer is wrong. I'm not sure how that happens. That seems like a bit of an issue. Of course, my instructor told me they wrote javascript in a few weeks or something, so maybe I'm expecting too much refinement.

  • Loading more items...