Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
.
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?
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!
I'm failing two of the basic tests, the ones for f(f(5)) and f(f(10)). Any advice?
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.
This comment is hidden because it contains spoiler information about the solution
Just copy them from the description ;-)
How do you even create the characters?
closing this issue as a duplicate, to keep the newer one that mentions JS as well
done, but this is pointless, there are still many loopholes
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.
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.
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.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...