1. Understand the task carefully. Write down the scenarios.
2. Break the problems in parts/functions if they could.
3. Check if there is existing code in your library for the functions.
4. If not check if the problem can be solved with a certain algorithm.
5. Start coding and test the code with unit test cases.