I have, with help, managed to solve my own question. However, the solution I came up with was short (~15 lines of code) and perhaps more transparent -- at least for someone at my level.
Then, I got even more help with a much more elaborate solution which takes into account many other details (slightly outside the scope of the question) of what I wanted to do, but that solution is much longer (~100 lines) and I'm not sure that I could fully do it justice if I were to answer my question with that solution.
So my question here is basically what the best practice would be for a case like this. Should I answer with the simpler, but less effective, solution? Should I, instead, try and answer with the second longer solution? Or should I just not answer at all, since I did not come up with the solutions on my own?