Like every other thing, the process starts with getting to know the basics of the algorithm you have chosen for your problem. You will need to consult different learning sources and choose the one that works best for you. Then start by breaking the algorithm into small units. Begin with a simple example, and when you get the grip on things, you validate with a trusted implementation. And then you complete the whole process. It probably sounds more difficult than it is. But it’s totally worth trying!