7 kyu
BAD Hash - String to Int
108 of 259Bigg-T
Loading description...
Fundamentals
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.
is not a question.
thanks for kata.that was good.
Steps c and d are clearly the most difficult in the task ((NOT a) shift left by 2 bits)), I think the examples should give the expected value for c, not just for a and b.
b := sum of every difference between the consecutive characters of the input : Does it mean "sum of difference of ascii values"?
Using C.
The description is incorrect/misleading. It states "b := sum of every difference between the consecutive characters of the input" The difference between two numbers is always a positive value. This kata requires you to take the higher index and subtract the lower index, e.g. str[1] - str[0], str[2] - str[1] and so forth. abs(str[1] - str[2]) will give you the difference between two numbers, but is incorrect here.
I agree that the kata is misleading in step (b).
This is incorrect. A difference is the result of subtracting one number from another number. In the equation
5 - 7 = -2
,-2
is the difference.But you're right: Step (b) should specify the direction of the subtraction operation.
Python translation. Please, review and approve (the author is not active anymore).
Bumping translation.
Approved.
C version needs random tests.
The NASM translation (which I approved an hour ago) has random tests. These random tests can be copied to the C translation without any changes.
Tests are fixed (I copied uniapi's test code).
Please, NASM Translation
Suggestions:
Done