I recently posted an algorithm question on SO and it was closed as a non-programming related. As far as I know, algorithms were always part of CS.

6 Answers 6


Look at your question I can honestly say that you should ask it at mathoverflow.net.

Does this mean that you can't ask any math question? I think no; you can ask math questions that are not too technical or specific, something like high school algebra or first year undergrad calculus are accepted, I think. Beyond that, I suggest you take it to mathoverflow.


It has been nominated for reopening and is (temporarily at least) open again.

I would say that algorithms are reasonable questions for StackOverflow. Clearly, not everyone agrees, but it doesn't belong on SuperUser or ServerFault (or Meta), so where else could they be asked.

  • 5
    Algorithm-related questions may be reasonable on SO. This particular question is basic logic / math; it's no more related to programming than solving a linear equation would be.
    – ChssPly76
    Oct 18, 2009 at 2:27
  • 3
    You're making the assumption all questions belong somewhere on the Trilogy. That isn't true.
    – GManNickG
    Oct 18, 2009 at 5:20

Technically it's purely math related, but computer science is simply heavily applied math. I wouldn't vote to close because it is very clearly related to programming (i.e. it's for programming purposes). It wouldn't make sense to ask:

To find out whether N is a prime number, we only need to look for all numbers less than or equal to sqrt(N). Why is that? I am working as a carpenter and trying to understand the reasoning behind the floor plans.

Therefore, I would say it's okay for Stack Overflow.


Not really programming related. It is basic mathematical reasoning, and you would have been better off puzzling over until you got it yourself.

But close enough that I wouldn't vote to close. On the other hand, I wouldn't vote to reopen either...


That is so not an algorithm question. And if you think it is, you're wrong.

  • 2
    Yup. The word "algorithm" s being thrown around the comments thread like it was a magical Shield of Appropriateness +2, but the question is fundamentally about arithmetic. Oct 18, 2009 at 14:01

As a proponent of leaving the question closed I suppose I should reply.

Not all questions belong in the Trilogy. To say "it doesn't belong on SU or SF, therefore it must belong on SO." isn't valid.

I do agree it's a thin line. But imagine if the question had no language attached and the user had simply asked "To find out whether N is a prime number, we only need to look for all numbers less than or equal to sqrt(N). Why is that?" I don't think anybody here would think it was programming related, because it's pure math. In the same manner saying "How do they make waffles look so tasty? Oh, because I'm programming a waffle simulator" doesn't suddenly make waffles programming related, I don't think "Why is pure math question X so? Oh, I'm implementing it" makes the question related to programming.

Yes, programming is applied mathematics, but it's the application we talk about, not the pure mathematics. I don't find saying "well then algorithms etc also aren't programming related since they are math" is valid either. They are programming related because we implement them. We take these algorithms and apply them. How can one "apply" why the minimum number to check is sqrt(N)?

You must log in to answer this question.

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