Retired
Array Condenser Step Calculator (retired)
5 of 9Leadboy
Loading description...
Arrays
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.
Description should specify that an element that requires multiple reductions adds multiple steps.
( Haskell, possibly others )
Random tests have arrays that contain numbers up to and including at least
100
.Haskell: You should clarify that the first step taken must be
The sum of adjacent numbers
, even if given digits are > 9. And emphasise that you have to reduce to single digit numbers before adding adjacent numbers (19 with added digits = 10, must be reduced again to 1, NOT passed to next reduction cycle)According to the spec, given digits should not be
> 9
.Re-raising issue below.
It gives you an example in the description :
"Given the array [3,4,5] The first step would be processed as: (3+4) == 7 (4+5) == 9 Result after 1 step: array == [7,9]
The second step would be processed as: (7+9) == 16 <- too large, must reduce"
When you do the sum, if any of the results are > 10 you digit sum them.
The description doesn't explain properly what to do with numbers which are
> 9
.What's the issue, it seemed straight forward to me. You run a digit sum on each result if necessary after the condensing/sums.
The digits that compose what number? I tested 2 versions:
3, 4, 5, 5, 5 7, 10->1, 5 8, 5 13->4
3, 4, 5, 5, 5 7, 5, 5, 5 12->3, 5, 5 8, 5 13->4
The number which is produced by the adding.
3, 4, 5, 5, 5
this is reduced to
7, 9, 10, 10 (r=1)
that is one reduction
then tens are reduced
7, 9, 1 , 1
that is two more reductions (r=3)
16, 10, 1 (r=4)
7, 1 , 1 (r=6)
8, 2 (r=7)
10 (r=8)
1 (r=9)
I would never have guessed. 1 kyu for sure.
The more you know.
Please, fix the issues before resolving them. It's very cool that you can read minds, but most people cannot, and so they need a proper explanation in the description, not in the discourse.
The description was updated to match the example above, if you can't follow that and think it is unclear still - well you understand the procedure now so write it out how you do and replace it.
Ruby needs fixed tests.
Fixed.
Resolved.
Haskell : https://www.codewars.com/kumite/5bde3c16c5ee2a293d000065?sel=5bde3c16c5ee2a293d000065
Better one : https://www.codewars.com/kumite/5bde3c16c5ee2a293d000065?sel=5bde48a2d9b84087b4000065
Update the description to remove conflict :
https://www.codewars.com/kumite/5bde48a2d9b84087b4000065?sel=5bdf39d18ceb1c830100006e
Never mind. I gave up.
What did you give up on?
Random tests do not conform to description.
Issue raised separately above.