News for hackers. Stuff that matters.
Re:enclose.horse by qsort on Tuesday January 06, 2026 @05:35AM (#46510760)
I'd bet it's NP-hard. The standard reduction to a flow problem only tells you if a cut exists (by min-cut max-flow duality), but here we want the cut of size at most N that maximizes enclosed area.

The Leetcode version of this is "find articulation points", which is just a DFS, but it's less general than what is presented here.

There are no comments on this comment yet.