Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Yes, my solution passes now. Thanks!
Not an issue. This kata uses floats in its design, it would not make sense differently. You don't prove there is anything wrong in the kata.
Don't raise issues so lightly in the future and read carefully this: https://docs.codewars.com/training/troubleshooting/
I found the definition of the class Point may be wrong. The type of x is double, and the method equals use "==" to judge whether a.x equals to b.x. I thought it will always be false.
In the context, I thought may type int be more fit for the issue! As following:
@Override
public boolean equals(Object obj) {
if (obj instanceof Point) {
Point other = (Point) obj;
return x == other.x && y == other.y;
} else {
return false;
}
}