These are real problems I've had to solve doing regular work on user stories that demonstrate that data structures, algorithms, and "computer science" are still needed. Most of what I've done is building UIs so some of these are problems I encountered while building react front end apps.
The only difference between the problems here and the problems I solved in my work is that I stripped away all the (boring) proprietary code and kept only the core of the problem (aka the fun bits).
These aren't too far from the various koans or "advent of coding" problems but I really want to keep banging on the fact that these are actual problems business users needed solved and not made up brain teasers.
I've included test cases that should demonstrate enough of the problem. I've also got a branch for my solutions where I present not the best solution but "a solution" to the problem.