6 kyu
Vertical symmetry on coordinate plane
61 of 64kdmatrosov
Loading description...
Algorithms
Mathematics
Geometry
Puzzles
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.
Updated auto tests added extra example tests (to solvers also) to check array with an odd number of elements
Updated auto tests Now it can generate more than one pair on horizontal Added one more test to Example with 2/3/4 pairs on horizontal
Haskell translation
Approved.
I have gone over the description a bit and made some cosmetic changes - hope you don't mind.
This comment has been hidden.
Thank you!! Improved randomizing for incorrect arrays. Now, you must do some checks
Spare us the input validation. It adds nothing ( but boring, mindnumbing makework ).
An empty array should not be invalid. Any
X
should be a valid return value for an empty array. With a different way of testing, this would be obvious.Why specify
2
digit precision when this is not in any way tested?Thanks for feedback Removed validation. It was bad idea. Add real numbers, but now it seems to be unclear and thats why more difficult then it is
The floating point values introduce inaccuracies. I fixed my solution by converting intermediate values to integers, which kind of defeats the point of using floating point values.
It would seem the floating point values are about as useful as the input validation ..
Any thought on empty arrays? They are not tested anymore, but they would seem to be valid input.
( The fact they aren't tested would deserve a mention in the description BTW )
Made 0 for empty array, because it is center of coordinatre plane And you are totally right about floating point values. They were removed, and your solution came back
Empty array is not being tested however.
the second test is
Test.assertEquals(checkVerticalSymmetry([]), 0);
, it is right, isnt it? or you mean something else? I would be grateful if you could explain how I should check empty arrayThat's an Example Test, isn't it? But you don't have to pass those; you only have to pass the Submit Tests. Submit Tests are random only.
On publishing codewars checks my solution to pass both tests: Submit and Example. If Example test ruins, I cant update kata
Maybe on publishing, but solvers do not have to pass the Example Tests. Really.
took in! moved check for empty array to required tests. Thanks
I must describe some tests for example and all cases for solvers
So, at least an array should be provided according to the desc
These cases do not make this kata more interesting. And it's not a good way to set catch about
invalid input
in the complete test, nope, you should list all possible invalid inputs form and the expected results.Removed them from test and add information about this to description
o_O
Random Tests are not well designed to include cases expecting
null
as result.Added to random tests null possibility
O_o