# My question (calculate all the squares up to x using only addition and subtraction) has being closed as a duplicate

I'm quite new to Programming Puzzles & Code Golf, and my question Calculate all the squares up to x using only addition and subtraction has been closed as a duplicate, who say it's a duplicate of Most optimized algorithm for incrementing squares.

I don't think that my question is a duplicate, as I specifically ask for only addition and subtraction.

Therefore, is there anything I can improve in my question, or is it clearly a duplicate?

Thank you.

• The best way to increment squares uses only addition. A lot of the answers can be used on yours with almost no modification. I didn't flag it as a duplicate myself, but in my opinion it is not significantly different Commented Feb 23, 2014 at 12:12
• No, I suggest that your question is indeed a duplicate. Commented Feb 23, 2014 at 12:20
• Related question (see in particular the two most upvoted answers) Commented Mar 1, 2014 at 16:26
• It seems significantly different to me. This is code-golf while the other is code-challenge; this one is clearly defined and restricted (only addition, subtraction, and arrays; no strings or data structures (except arrays)) while the other is very lenient. This one seems to me hard to solve at all within the requirements; the other one is easy to solve, but seems to invite clever solutions. (They're aren't any right now, but that's another issue.) Commented Mar 1, 2014 at 22:51

The old question has no winning criteria and is ill-defined. My brain raises compilation error trying to understand this sentence of the old question:

Write the "fastest" program to print an incrementing series of squares from a given input to a given input.

Fortunately the provided input/output example make it comprehensible, and this could be salvaged by editing.

The big problem in the old question is that it has no well-defined objective winning criteria, it is just "The entries will be judged on the most efficient algorithm". How do you measure efficiency? Is this algorithmic complexity? What about measuring it for randomized algorithms? What should be done in the case of two tying entries? In my opinion, the old question should be closed as off-topic for lacking an objective winning criteria, but there should be no reason to do this for a 3-year old question, except that it can be used as an excuse to spoil the fun of whoever wants to answer the new question.

Anyway, even if someone comes with a precise definition of the efficiency in the old question, the new question is a code-golf and have different rules on what is permitted to do or not. So, it is likely that most entries in the new question (including the most likely to win) would be invalid in the old question. All the answers in the old question are invalid in the new. This is a strong sign that it is not a duplicate.

I do beleive that your question isn't a duplicate.
The task is a bit different, and the answers aren't the exact same, they are similar, because they use the same algorithm. The whole point of algorithms is to solve many similar tasks.

There is a slight difference between the literal wording of the close reason:

and the way it is used on this stack and others. The general rule is: a question is a duplicate of another if it naturally gets the same answers. In other words, the second sentence of the message is more significant than the first. On other stacks this is because the point is to guide people to the right answer, and closing with a link to a page which answers their question achieves that goal.

This stack is different, because it's about having fun answering rather than resolving people's uncertainties. However, a similar principle applies. If we already have a page of answers which just need a tiny tweak, what's the point of copying them all across? Maybe it lets people get double points for their answers, but the attention drawn by the closed question pointing at the older one usually gives the better answers a small bump anyway.

In this particular case, your question is closer to the existing one than many which get closed as duplicates on the grounds that existing answers just need a small tweak to solve them. (See e.g. Partition of array).

I should note one exception: when a very general problem has been asked, a more specific instance might be worth keeping open if there is a good reason to expect that the additional structure will allow solutions which aren't applicable to the general problem but are better than the solutions to the general problem.

• Yes, but that question has only three answers, and none of the answer to my question is an exact duplicate. Commented Feb 25, 2014 at 11:12
• @toothbrush, should I add bold markup to tweak to make it stand out? Commented Feb 25, 2014 at 11:19
• So, what do you want me to do? I'm new to Stack Exchange. I don't understand. That question has 3 answers, and my question has 6 answers. Commented Feb 25, 2014 at 18:23
• @toothbrush, I'm not asking you to do anything. My aims are threefold: firstly to explain to you why your question was closed as a duplicate; secondly to document my understanding of the community understanding of what "duplicate" means; and thirdly to get an explanation from the 5 people who voted to reopen your question as to why they disagree, and hopefully to allow the community to discuss and vote and make explicit what the consensus is. Commented Feb 25, 2014 at 20:17
• Ah, I hadn't realised that you were one of the 5 (and I hadn't realised it was even possible to vote to reopen your own question). In that case: see the third point. Commented Feb 25, 2014 at 20:20
• OK. I just didn't understand. Commented Feb 25, 2014 at 20:23