I assume you would have already learned the algorithm already, then translate this knowledge into code in order to implement your project. If in doubt about the algorithm, you should ask your teacher or conduct literature search.
CP helps people to learn. We neither do their assignments/homeworks/projects nor supply source code.
what-have-you-tried[
^]
If you encounter any difficulties with your coding, always consult Google first, everything else fails, then visit CP and ask questions related to specific issues.