Re:University of Illinois issues DMCA takedown for previous ...
by lmm on Wednesday February 11, 2015 @10:54AM
(#9033517)
APIs shouldn't be copyrightable as they're necessary for interfacing. The solution to a homework problem shouldn't be a derivative work of the problem, and so it should be possible to distribute the solution in a way that doesn't infringe on the university's copyright.
I don't think you can claim that changing code absolves you of copyright issues, it might make it harder to find though.