6 kyu
A Combinatorial Way to Get Products and Sums of an Array
173 of 194raulbc777
Loading description...
Fundamentals
Mathematics
Data Structures
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.
Nice kata.
Description should be language-agnostic (It is by now, but translations may be added in future, soo... ~~)
Ruby 3.0 should be enabled
Undeclared variables in initial solution should be replaced with
0
Fixed in this fork
Initial code uses
Larger than
as the last return item's key but everywhere else expectsHigher than
.And the format is wrong either: It's not
Equals to max_val:
, butEquals to max_val
.Also, if you're going through the trouble of supplying the output for the users, at least make it correct (i.e.
"Equals to max_val:
should bef"Equals to {max_val}":
. Parsing the provided solution code for your errors and/or omissions shouldn't be part of the task.Nevermind, I took the liberty to update the kata:
Approved.
Hi Raul! Me again! ;)
well, some points (mix of issues and suggestions but merely the second one) about this kata (all in python, ofc):
"Lower than max_val"
?max_value < 0
1) - A list or array of integers >>> (zi > 0 and/or zi < 0) <<< ...
but I found zeroes in the random tests:[0, -49, -16, 50, 20, 22, -3]
(and same with the beginning of the description:(positive and/or negative)
exclude0
values too)cheers!
This comment has been hidden.
This is an interesting problem, I think with some decent beginner code covering a bunch of things (hash, array, a bunch of methods, etc. )
BfB, I cleaned up a lot of the issues, the only thing remaining as an issue I believe is the random scope of testing. If you still feel that is an issue let me know and I'll refactor that to spam random fails.
Oh thanks for your feedback. I'll improve the description.
^^
Thanks, I'll see it
Ruby translation kumited.