-3

I am stuck on some competitive programming problem. I think the proper approach to solve the problem is dynamic programming and I have implemented my solution but I keep getting wrong answer. If I think my algorithm is correct and the problem is in the implementation, can I ask my question here?

Edit: Suppose I ask a question on stackoverflow about a competitive programming question ( not an ongoing contest ) providing the link to the problem, a brief description of the problem, my algorithm and a link to the implementation. And ask what is wrong with my code or algorithm that I keep getting wrong answer? This means that I had no problem in implementing my algorithm and it works fine, but there could be a logical error in my implementation that shows itself on some special cases or my algorithm isn't optimal or it is completely wrong. Would it be on topic?

4
  • 2
    ON the main SO site, sure. Don't forget to include the details of your testing/debugging efforts so far - inputs, outputs, what you found out when you stepped through with your debugger etc. Nov 13, 2015 at 20:48
  • 1
    If you get an excellent answer, will you delete your question immediately?
    – Jongware
    Nov 13, 2015 at 20:49
  • 1
    @Jongware why would I do that? I am not talking about ongoing contests. I am referring to problems that I have been stuck on for at least a day.
    – Saeid
    Nov 13, 2015 at 21:04
  • 2
    A day+ ? Oh good - you will have accumulated lots of useful test/debug info and will not be just dumping copied code with 'doesn't work'. Nov 13, 2015 at 22:49

1 Answer 1

12

The origin of your problem is irrelevant. Only your problem is relevant.

Is it a good question and on topic?

If so - you can ask it.

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