6 kyu
Binary string
862 of 895ssineriz
Loading description...
Bits
Binary
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.
Kata Update
require
Merged.
JS anticheat can be bypassed trivially.
This comment has been hidden.
JS :
Fixed.
Fixed
This was fun to try without using the bitwise operators. :)
I've seen your solution and I must admit that, while appreciating it (it can be easily adapted for any base other than 2), it proves good math knowledge, but also, admit it, a little bit of masochism ;-) Thanks for trying.
Oh, definitely it goes the way of masochism — it was my attempt to see if I could avoid using both the Number.toString() function and the bitwise operators, and I enjoyed it!
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
So easy and I didn't guess it! One never stops learning... Thanks guys.
This comment has been hidden.
I think you need test cases with MUCH larger numbers.
This comment has been hidden.
Added a random big positive 32 bit large number as test. Unfortunately, in the requirements I told numbers would be positive, so I believe >> and >>> will behave the same way. That said, probably a higher level kata can be crafted asking to correctly handle two's complement for negatives. Thank you for suggestions.