5 kyu
The Binary Binary Expansion
206 of 212Voile
Loading description...
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Haskell translation
Great kata to exercise with.
Hi, I have a problem in the tests, my algorithm calmly passes small numbers, but on large ones I can't pass because there is 0 there.
0
can be solved, but the description says "positive", and the tests now do not generate zeroes ( this was probably changed relatively recently ).had no idea very very large meant 2 ** 200000
oof, I think that should have been mentioned
I've tried this one with recursion. All tests passed. On my ide I tried with huge numbers and ends very fast. But when I submit the attempt, crash on large numbers test.
It says: RecursionError: maximum recursion depth exceeded in comparison
The code works. But it seems to be a limit in recursion on codewars
Sorry, but it is not an issue with the Kata but with your code.
You have to find a iterative way to do this...
Or increase the supported recursion depth. There's a syscall for that - Google is your friend here, I don't know it from memory.
This one is confusing. n is only supposed to be an odd number, but in the test cases, I am given even numbers. I have code that works only for odd numbers, and not for even ones. If n is supposed to be even, then how are the expansions supposed to be worked out?
Fixed
funny one! :)
If you look at my solution it's even funnier ;-)
Yeah I saw it. But I understand almost nothing to this type of operators (the pain of being an autodidact... ;/ ). One day, I'll find the motivation to learn "properly" about that... Maybe... ;o