It would be good for me to learn about your thinking process so that I can replicate the same pattern or reason about the problem in a similar way.
Apart from that, it would be awesome to go through the process of writing the code. It might help folks like me to understand the flow and how you are solving the problem.
It would be better if you go through problem and write solution step by step with your thought process as you already don't know solution in spite of copy and paste. Otherwise internet has all solution of all problems.