I agreed to write software for a friend's father when I was a first-year college student. It was for scheduling resources. I didn't realize it at the time, but it turned out to be an NP complete problem.
Thankfully just finding a solution was acceptable - didn't need to find the optimal solution. It was fun writing heuristics - actually a set of them - that could be changed while the program was running and trying to solve the problem.
I had a solution done in a summer, but then worked on new versions each successive year. My big plans to sell it fell flat. I was a better developer than marketer.
It was a lot of fun and taught me early on a lot about the real-world of development - (end users, requirements gathering, testing, etc - a lot of the things that you DON'T get in undergrad CS)
To address your question - it was for a teacher who had to schedule students for special instruction. He was a speech therapist and audiologist - but it could be applied to any similar field. He had existing teacher, classroom and student activities to work around and had to meet some specific number of times per week with students. It is the knapsack problem or any number of other similar/equivalent scheduling problems.
Again, it turned out that just getting a solution was fine - we didn't have to maximize or minimize anything - we just had to accommodate all the students.
I can only recall not being able to solve test cases that I used to run scenarios - all the problems he provided over the years we solved.
I was never able to market it - mostly because I had no idea what I was doing and I was not sure how to reach my market/buyers.