I asked a question some time ago and accepted an answer of a certain user. Some time later I figured out a much better way to solve my problem.

How should I post my better solution? As an edit in the original question or as an answer? Should I un-accept the not-so-good answer I accepted before?

  • 1
    If your new answer is truly different and you feel it's a better answer, then I think you should change which answer is accepted. On the other hand, if your new answer is better but not really different you should edit the accepted answer to improve it -- so long as you are not changing the meaning of the original. Note that I am biased; in stackoverflow.com/questions/6217055/… my accepted answer was unaccepted a year after the fact because the OP decided to improve my (weak but clearly sufficient) answer in a new answer instead. – mah Feb 15 '16 at 16:09
  • I agree with mah that a slight improvement to an existing answer is better done as an edit but be prepared for any edit that modifies code to get rejected. It's just really iffy getting that kind of thing approved without someone seeing it as changing the meaning of the post or something meant to address the OP. – BSMP Feb 15 '16 at 19:58
  • Related to this meta.stackexchange.com/questions/216719/… – g3rv4 Feb 17 '16 at 18:05

Never put an answer in the question, that's simply not what it's for.

You can answer your own question though, and if you found a good different solution, please do!

Whether you should unaccept the answer you accepted though, and accept your own?
That's for you to decide, are you sure it's better? I personally would be reluctant to assert so until and unless if gathers at least a significant number of upvotes on its own.
It's just that unaccepting an answer feels like not having properly decided before, and being capricious, even though it isn't. Also, I might be biased about my own work, or at least blind to (some) of it's flaws.

  • relevant linky I stole from a related question: blog.stackoverflow.com/2011/07/… – Gimby Feb 15 '16 at 10:23
  • 26
    Given the statement, "I figured out a much better way to solve my problem." keeping the checkmark on a much worse answer isn't appropriate. The OP seems to feel pretty strongly that it's not just a marginal improvement, but rather a significant one. – Servy Feb 15 '16 at 15:50
  • 1
    I would say if the accepted answer did help, then leave it accepted. If it didn't, accept your own. – Sobrique Feb 15 '16 at 16:05
  • 23
    @Sobrique But that's not what the accepted answer is there to indicate. The accepted answer is there to indicate the answer that the OP feel is the best, not there to indicate any answer that helps at all, even if it helps less than another answer. If the answer is helpful it can be upvoted. It should only be accepted if it's the most helpful. – Servy Feb 15 '16 at 16:19
  • Although I do agree with most of your post -1 for not accepting the better answer. – PeeHaa Feb 16 '16 at 22:05
  • Shouldn't an SO reader find the best answer to a question as quickly as possible? I care less of WHO has the accepted answer, if it is the best one. Credits should be given where appropriate, though. – andersoyvind Feb 17 '16 at 11:24
  • @PeeHaa Well, I just wanted to say that your own judgement of the relative merits of the new post might be a bit off, as it's yours. Otherwise, sure. – Deduplicator Feb 17 '16 at 16:07

How should I post my better solution?

Like any other answer - post an answer. Do not post the answer as an edit to the question.


Any time a better answer comes along, be it yours or of someone else, accept the best answer. Up-vote those that are useful.

After accepting an answer, it would be wise to first let a new answer (yours or of someone else) to age (perhaps a few days) to see how the community rates it. Use that feedback as part of your decision to accept the new one or not.


I agree with the other answers, but I read in the Stack Overflow Tour:


So it is fully up to the original poster to decide. They can pick whichever answer worked best for them.


What I did with the following question:

How do I make a WPF window movable by dragging the extended window frame?

was post an answer of my own, move the accept to my answer, and award a bounty to the answer I previously accepted for having pointed me in the right direction, overwhelmingly making up for the accept (it was my pleasure to). You don't need to award a bounty as large as +100; the minimum of +50 will do if you're on a tight budget and need to preserve privileges.

See also Etiquette for accepting more detailed own answer based on original answer — I think what I did is an option worth considering regardless of whether your self-answer is related to the previously accepted answer or not.

You must log in to answer this question.

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