6 kyu
Simple Fun #191: Sum Of Regular Numbers
140 of 314myjinxin2015
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.
python new test framework is required. updated in this fork
Approved
Very funny Kata! Thanks to author!!!
In JS (at least), such solution will fail for cases when same step sequences with lengths greater than 3 appear more than once, thus overrwriting the previous occurrences...
Ruby translation should be updated 3.0, see relevent information here: https://github.com/codewars/content-issues/wiki/List-of-Ruby-Kata-to-Update
Enabled in this fork + Cleanup tests
Prompt is ambiguous, take for instance the input [3,4,5,6,7]. On one reading of the prompt this array contains one sequence that includes each number once i.e. [3,4,5,6,7]. On another reading this array contains six sequences that fit the requirements, [3,4,5], [4,5,6], [5,6,7], [3,4,5,6], [4,5,6,7], and [3,4,5,6,7]. A method that solves for the first version of the prompt will get the same answer as a method that solves for the second version of the prompt only when the input contains no sequences longer than 3.
The numbers of consecutive identical step should be considered as a whole Should I add this to the description? Or any other words to explain it?
I had the same problem understanding it, I would add an example, something like "note that [-1000, 1, 2, 3, 4] should output 10 and not 15, because the sequences [1, 2, 3] and [2, 3, 4] belong to the longer sequence [1, 2, 3, 4]", btw nice kata
Description changed, thanks ;-)