Last month, this question was posted on Stack Overflow. I thought it was a fascinating question but did not give an answer since I thought the question was very poor for these reasons.
- The question was an active competition question, on hackerearth.com, "Altitudes" in the June Circuits '19 series of questions.
- The question originally was basically just a link to a graphic showing the question. The graphic was not needed, since the question is originally given entirely in text. When I asked the OP to give the question in text, he added a brief summary of the question that was somewhat incorrect.
- The OP showed absolutely no work of his own. When asked to show some work he gave the excuse "I have no idea how to solve this problem."
- When I pointed out in comments the weaknesses in his question, he only added the summary, stated he would do better in the future, and kept asking for an answer.
It seemed clear that the OP was looking for a lazy way to solve a competition question, so I voted to close. I also worked out some code for the question, code that is not obvious. The competition ended on June 30 so that issue is gone. I do not want to answer such a poor question, though apparently not many people agree that the question is so poor and the question has not been closed. The answers in the competition do not appear to be available to non-members of that site (I have not seen any of those answers), so my answer would add something new to the internet, not just to this site. Clearly the question is interesting, since it was in a competition and others did answer within the competition.
My question: Is is appropriate for me to ask a new question on Stack Overflow, copying the old question but typing the question as text and linking to the original question, and self-answer my question? I do not see anything about this reason for a new question and self-answer in any question on meta or in Stack Overflow's documentation (such as this item). My solution is fairly complicated and I would love to see better answers from others.
Conclusion: Due to the answer and some comments, I have decided not to start my own question. Instead, I edited the question and gave an answer. Thanks for the advice.
math
, which raises all kinds of red flags with me. Yes, technically, algorithms are on topic here, but they need to be programming-related.math
tag just means that math would be needed in the algorithm. I did use Bezout's theorem and some other math in my code. My answer definitely is a program--more lengthy than I would like.