6 kyu
Largest Cross Sum
127 of 262marbiru
Loading description...
Fundamentals
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. My initial strategy was flawed and so time was wasted until I realized what I needed to do. After that, things went quicky. *Your code should account for all possible cross sums.
Very challenging kata, nince one, congratulations.
This comment has been hidden.
Not a kata issue!
Take the 2nd row and 2nd col number for example (
1
)2nd row sum -->
8
2nd col sum -->
6
So, the answer is
8 + 6 - 1
-->13
This comment has been hidden.
Take number
5
as an example.First row sum -->
20
Second col sum -->
14
So, the answer is
20 + 14 - 5
-->29
This comment has been hidden.
max on rows may not be "aligned" with max on cols, to lead to the "global max" on both dimensions. Not sure I'm clear... Thing is, you have the crossing element that is removed, hence my remark.
Python translation please check and aprove. Thank you
Approved by someone
The tests shouldn't log anything.
This comment has been hidden.
Anyone else having issues getting these test to pass in the random test section? I'm logging out the matrix and as far as I can tell my sum is correct and the test has the incorrect number.
Make sure you don't mutate the input array.
I made a C# translation for this Kata.
Thanks Souzooka! Can I ask why only one random test, though?
There should be 100 random tests, e.g.
for (int i = 0; i < 100; ++i)
in the RandomTest function.ok, great! I was only seeing one in the "view run output" view for some reason. Approved, thanks so much!
.
The description should state if empty matrices or empty rows can be passed into the function, e.g.
[]
or[[], [], []]
.great point, thanks!