Hello,
I have this problem ready with me. I can give it to you immediately. This exact problem was assigned to me during my grad-school days, and I had got the best grade for the implementation. I understand that you are a student, and therefore I'm sure, using my code, you'll receive the best grades too.
Feel free to contact me and discuss further details.
Regards.