6 kyu
Largest Radial Sum
59 of 478zeroxoneafour
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.
PHP
translationApproved by someone
This comment has been hidden.
You can try using print functions to see whats being passed in as input.
Random Tests random expected 35 to equal 49 - This is all I got in random tests
understanding the problem here is more difficult than solving it
I agree. The description should replace "equidistant" with "evenly spaced", in my opinion. "Equidistant" had me picturing groups where all members were the same distance from each other, which would limit the groups to sizes of 1, 2, or 3.
I would totally agree with you if I knew English better. But when I put those words into a translator, they came out with the same meaning
c++ Very easy, pass in the first attempt.
Rust translation
lgtm
Scala translation
Initial solution:
largestRadiaSum
->largestRadialSum
Fixed, ty
Was wondering why I couldn't merge this but I guess I already had.
JavaScript translation
Merged
Description should be lanugage-agnostic (Removal of function name and replaced with something more generalized)
The description is just in psuedocode, none of the languages supplied invoke the function exactly like how its described in the description. What should it be changed to?
I removed the function names and just used the input -> output format for the main function (max() is still a function like in your example)
Fixed, then.
Haskell translation
Approved by author
Python translation
Lgtm
Approved by author
TypeScript translation
Is it possible to add a random test?
There are random tests (except in the sample tests), same as in the Java version.
Ok, merging
Approved by author
[C++]
srand
?)I added an srand call before the random tests begin. As for the solution, can I see what you have? I don't believe the reference solution is wrong, but I may be mistaken.
This is a perfect response. Short, clear, direct, and cautiously assertive, yet open to the potential of unknowns.
P.S. there should be a set of small random tests.
I apologize for the C++ code, I asked my friend to write a C++ solution because I wrote the Java one. I refactored his C++ code to make it like the Java edition and it now it is identical to the Java one in terms of control flow. I also added random tests up to array size 50, and also kept size 1000 array random tests for both C++ and Java.
.
Sir I was the friend he was referring to, do not listen to his waffling, see my solution if needed.
Cheers.