Sounds like a student assignment.
Now, if you were in a fraternity, you could just search the files for last year's solutions from your borthers. Fortunately for you, you're probably not a frat boy, so do yourself an even bigger service and figure these out on your own.
You might be asked something similar on an interview one day and it sure would be nice to know how to come up with the answers on your own.
Good luck - seriously.
