For homework I have recently formulated the following (based on the canned comment in meta):
What have you tried? Where did you get stuck? We want to help you with your specific problems, not just do your homework. However, as it is we don't know what this problem is and thus how to help. See [here](http://meta.cs.stackexchange.com/questions/594/the-return-of-the-homework-question) for a relevant discussion. If you are uncertain how to improve your question, why not ask around in [chat]?