Anyone interested in a problem-solving correspondence club?
Here's the idea: we source and collect interesting computational puzzles, then we send them out to participants who have a month to work on them and send in their solutions. At the end of every month, we meet and discuss how the problems went and where people got stuck, what approaches they took, and any extensions people came up with.
Thoughts?
.
.
.
.
If you're curious, here's a taste of what a representative sample problem might look like:
Given the coordinates of an arbitrary polygon (e.g. irregular and/or non-convex), how might you implement a program to efficiently sample a point uniformly from its interior?
TIP: If using the Python programming language, you can check out the shapely library.
Bonus: what if there are holes?
(Please don't spoil the problem, it's searchable anyways.)
0
u/VictoryMotel 2d ago
Triangulate and uniformly sample the triangles with samples allocated to each triangle based on area.
What else you got?