1

I am looking for feedback about my answer here.

Since the OP stated that he was trying to learn recursive algorithms, I wanted to try to explain why the solution I gave was the correct in order to fully address the question.

My question is, should I have spent the time/space in my answer to go through a detailed, tutorial-like explanation, or should I rather have posted a solution accompanied by a link to one of the dozens of recursion tutorials available on the web?

I won't lie, I was hoping to have gotten a few upvotes on that answer, but that is NOT why I am asking for guidance.

I want to be a helpful member of the SO community who is contributing value rather than just adding noise.

(To my knowledge, none of the other meta posts I have seen about answers address answers that are too verbose)

5
  • 1
    I've seen answers that long before, if you're just worried about it being unusually long.
    – BSMP
    Jun 26, 2015 at 17:21
  • @BSMP that was my primary concern. Jun 26, 2015 at 17:23
  • 1
    I've seen answers twice that long, so as long as the content is useful, there shouldn't be any issue.
    – CubeJockey
    Jun 26, 2015 at 17:27
  • What he needs is for somebody to show him how to do it with O(log(n)) recursion depth and O(1) storage. The proper solution if it has to be done by recursion. Or to talk him out of it because recursion is not the proper solution. You've got a lot more work to do to get there. Jun 26, 2015 at 18:47
  • @HansPassant I don't disagree, but the only way I know of to do that is with tail recursion (does java optimize tail recursion?), and that seemed to me to be beyond the scope of the question, and IMO probably would have left the OP more confused. Jun 26, 2015 at 19:10

1 Answer 1

2

This is a question that is simply answered by the votes that the post gets. If it gets a lot of upvotes, people felt that the information was useful. (Of course, in this case the results are somewhat tainted by the meta effect.)

1
  • Fair enough. I guess I just wanted to make sure I wasn't doing anything "wrong", even though wrong isn't the right word. I wanted to get the opinions of some veteran users on best-practices. Jun 26, 2015 at 17:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .