7 kyu
Minimum and Maximum Product of k Elements
220 of 275anter69
Loading description...
Arrays
Lists
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.
My code might be the ugliest solution in the world, but it works when put into my console. However some test cases do fail. Any advice?
Tests aren't using
it
blocks in Python - except one place where the old test framework is used instead.fixed
ok, so i wasn't crazy when i thought its harder than 7th kyu.
Good kata tho!
Haskell : https://www.codewars.com/kumite/5bd4b4a003631cd37a00000a?sel=5bd4b4a003631cd37a00000a
Approved (hoping it's good :-)
If it isn't, I am pretty sure Unnamed will point it out.
LOL. I don't necessarily solve every kata in every language, especially when a language doesn't have some convenient built-in function for the kata that some other languages does.
WTF??? Are you sure, that it is 7kyu??
Yes, since this is in Python/Ruby and the main things required for this kata are already available for import, or even builtin ;-)
This comment has been hidden.
should be a 6 kyu
Probably yes, but I can't change it...
No, but others can
The arrays are small enough that you don't need to be efficient in the solution.
Also quite similar: https://www.codewars.com/kata/closest-sum
Quite remotely...
Related: https://www.codewars.com/kata/simple-fun-number-312-maximum-product
Yes, but different enough :-)