8 kyu
Points of Reflection
3,390 of 10,230webtechalex
Loading description...
Mathematics
Geometry
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.
First, I thought it was an array, and I thought I needed to make another array and pass the result of the two equations through a for loop in the new array, but I found it always returned 1.
Then I searched and found that std::pair is a class template in C++ that provides a way to store two heterogeneous objects as a single unit. I had to watch a 21-minute mathematical video to learn about the equation: reflection with respect to the origin point.
For me, it is 10/10 for all the knowledge you have to have to solve it.
Lua translation !
Rust translate
approved
Scala translation
Approved
CoffeeScript translation
Approved
python new test framework is required. updated in this fork
Approved
I think an image should be added to the description 😯
difucult to understand for non English user) and i think formula should be provided. at least normal source.
difficult to understand for English users too haha
Bad kata. 99.99% math and 0.01% coding.
Well I would just delete it, but apparently I don't have permission, even though I wrote it in the first place...
In short: codewarriors like yourself are stuck with this kata. Complete it or just ignore it ;)
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
I thought it would be easier. In fact, I couldn't understand what a "reflection point" was, I couldn't find any information about it, and I hadn't heard of it before. The task is not difficult, but time consuming
Can soemone pls explain this kata better, and its requirement
You can check Wikipedia to learn more.
The composition of two point reflections is a translation. Specifically, point reflection at p followed by point reflection at q is translation by the vector 2(q − p).
C++ kumite that fixes issues (including this one) of the current translation. Will invalidate all solutions (17 at the moment).
using namespace std
present in the initial solution anymore.std::pair
instead ofstd::array
).Please, review and reject/approve.
Approved by someone
C++:
Resolved by this
C++ Translation
Please get familiar with C++ authoring guide: https://docs.codewars.com/languages/cpp/authoring and make sure you are familiar with guidelines for C++ translations.
Dear author, please make sure to properly review translations before approval.
+1 error in Java
eror in java. /src/test/java/ReflectedPoints.java:4: error: Reflections is not public in cw; cannot be accessed from outside package import static cw.Reflections.reflectPoint;"
add public to class Reflections{}
Initial solution fixed. Click 'reset' if it doesn't appear.
got an error (java): "./src/test/java/ReflectedPoints.java:4: error: Reflections is not public in cw; cannot be accessed from outside package import static cw.Reflections.reflectPoint;"
Managed to fix it by adding public modifier to class Reflections:
public class Reflections{}
Initial solution fixed. Click 'reset' if it doesn't appear.
COBOL Translation
Approved
This comment has been hidden.
Fixed.
There seems to be a bug for the Javascript-version. The following test case I randomly got is wrong, apparently: assert.deepEqual(symmetricPoint([340, -634], [162, 809]), [340, -634]); Could you check please?
Are you modifying the input?
I am afraid no. It is about the automatic tests and not the ones under control during programming.
Yes you are indeed modifying the input, read this for more info
Hint: Look for a pattern
C Translation kumited.
approved by someone ^w^
JS: Node v14 should be used along with its appropiate assertion tools (Mocha + Chai). Refer to this and this
Done. Thanks for raising.
Tired of all math katas. See here - https://www.hackerrank.com/challenges/find-point/forum
maths & deciphering instructions, not code!
Hi, could you consider approving this C# translation?
Hey, sorry for the delayed response. I've been on holiday without access to laptop. Tried to do it on mobile without success. All approved :)
This comment has been hidden.
That's correct, but I think Codewars is having some issues at the moment. It was slow when I tried it. Maybe refresh and resubmit or try again later.
It's more math task than programming. A good one though.
PHP Translation Kumited - please accept :D
'alr approved some time ago'
Ruby translation kumited:
https://www.codewars.com/kumite/57c109aedef38b69c800019c?sel=57c109aedef38b69c800019c
Python translation kumited:
https://www.codewars.com/kumite/57c10d624677bb196a000024?sel=57c10d624677bb196a000024