We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I guess there is a bug in the implementation of Graham's Scan algorithm.
Try the following testcase: Input: { 0, 0 }, { 1, 1 }, { 2, 2 }, { 1, 4 } output: { 1, 4 }, { 2, 2 }, { 1, 1 }, { 0, 0 } correct output: { 1, 4 }, { 2, 2 }, { 0, 0 }
I believe the problem is in line 70: points[1] is not necessarily a vertex of convex hull if points[1] and points[2] have the same direction.
Btw: thank you for your wonderful blogs and readable code!
The text was updated successfully, but these errors were encountered:
Yeah, the convex hull code doesn't even pass on CSES, like bruh.
Sorry, something went wrong.
No branches or pull requests
I guess there is a bug in the implementation of Graham's Scan algorithm.
Try the following testcase:
Input: { 0, 0 }, { 1, 1 }, { 2, 2 }, { 1, 4 }
output: { 1, 4 }, { 2, 2 }, { 1, 1 }, { 0, 0 }
correct output: { 1, 4 }, { 2, 2 }, { 0, 0 }
I believe the problem is in line 70: points[1] is not necessarily a vertex of convex hull if points[1] and points[2] have the same direction.
Btw: thank you for your wonderful blogs and readable code!
The text was updated successfully, but these errors were encountered: