This appears to be an interview test. If it is, you should be working on these on your own. It also appears that you have not written any code yet. You should first write out the algorithm for the problem if you are having trouble writing the code.
4 Likes
you need to hire someone not to ask for help! show us what you tried so far?