Adding a solution to problem 10. It works, but is very very very slow.
Problem 10 solved.
Added solution to problem 11.