Recently, when answering this question, I devised two solutions, each with a different approach. Now my doubt, and the point of this question, is whether I should've posted both solutions under a same answer.
What should be the accepted practice for this?