You would be on-topic to ask about the method you're thinking about, and as part of that you could include your code 'as' the pseudo-code [1][1] for discussion.
I don't think I'd close-vote a question of the following form:
I am trying to understand The Protocol, based on The Resources. I would like to implement the algorithm, but am not quite sure I've correctly understood how it works. As I currently understand it,
The Protocol as Understood.
However, I am slightly unsure how The Issue works.