I think the ideal would be something like an autograder, rather than a solution. There used to be a Coursera class from Princeton that relied on Sedgewick and Wayne algorithms book, and the class was very, very good.
Then we must hope people don't publish solutions on github!