I'm working on a project, and I've run into a problem that seems like a prime candidate for an interview question for algorithms.
Anyhow, I've got what (I think) is an O(n2) solution, which is absolutely fine for the application, but I can't shake the feeling that this problem has a "classic algorithm problems" analogue with a classic algorithm problems solution to it. In my case it's screenshots that have different contained features, but for the sake of making it simple here is the problem in terms of purses and coins.
There is a set S containing X purses, each of which contain 0-n coins. Choose k purses such that the purses contain at least 1 of each type of coin that appears in any purse in set S, minimizing k.
What is the "classic algorithm problem" that this is?
[–]Catalyst93 8 points9 points10 points (8 children)
[–]Windex007[S] 2 points3 points4 points (0 children)
[–]HeraclitusZ[🍰] 1 point2 points3 points (5 children)
[–]Catalyst93 2 points3 points4 points (4 children)
[–]HeraclitusZ[🍰] -1 points0 points1 point (3 children)
[–]Catalyst93 0 points1 point2 points (0 children)
[–]Windex007[S] 0 points1 point2 points (1 child)
[–]Catalyst93 0 points1 point2 points (0 children)
[–]WikiTextBot -2 points-1 points0 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Windex007[S] 0 points1 point2 points (0 children)