*** HOMEWORK ASSIGNMENT NOTICE ***
Abhi Kumar, your post contains material which resembles a homework assignment. If it is,
you should try to complete the
assignment on your own. If you run into specific problems, then posting a question is reasonable. However, expecting
complete answers is not.
Good luck!
*** HOMEWORK ASSIGNMENT NOTICE ***