2
\$\begingroup\$

Recently I asked this question: https://codegolf.stackexchange.com/questions/75040/solve-a-quadratic-expression. Seconds after I posted, it was flagged as a duplicate of Resolve quadratic equation, and was downvoted several times. The two titles look similar, but, as I put in the comments,

...The main challenge for mine is interpreting a string, whereas the other question's main challenge is solving a quadratic (as it takes three numbers separated by commas such as 1,2,3 rather than a visual expression such as x^2+2x+3).

I'm not sure why people who actually read my question would not be able to see that my challenge is different.

Can someone explain why it's considered a duplicate?

| |
\$\endgroup\$
  • 3
    \$\begingroup\$ Perhaps because parsing an expression is not interesting nor significant enough for the challenges to differ. \$\endgroup\$ – Conor O'Brien Mar 8 '16 at 0:38
  • \$\begingroup\$ We like 1-task challenges around here. If the "meat" of your challenge is parsing the expression, I'd recommend removing the "solve the equation" part, e.g: "5x+2x^2+4" -> (4,5,2). Otherwise, if the meat is the solving the equation part, then its a duplicate. \$\endgroup\$ – Nathan Merrill Mar 8 '16 at 0:58
7
\$\begingroup\$

Your challenge has two pieces to it:

  1. Parse a string
  2. Find the roots of a quadratic equation

If the string parsing part was left out, it would be an exact duplicate of Resolve quadratic equation. So, let's look at the string parsing part.

Parsing the string is either incredibly trivial (for languages with regex or similar features), or very cumbersome (for languages without such features). There are many submissions on the existing challenge that would be able to be copied over and be competitive with very minor modifications (a single call to a regex library would do the trick in many of them), so by that criteria it's a duplicate. Additionally, the string parsing requirement is a cumbersome I/O format that detracts from the main part of the challenge.

| |
\$\endgroup\$
  • 4
    \$\begingroup\$ While I agree that its a duplicate, parsing the string has potential to be a challenge (especially if we allow reordering of the parts, and combining like terms) \$\endgroup\$ – Nathan Merrill Mar 8 '16 at 1:08
  • \$\begingroup\$ @NathanMerrill Sure, but given the string format in the challenge in question (always simplified and in standard form), that's not interesting enough to set it apart. I agree that "output the standard form of the input expression" could be an interesting challenge on its own. \$\endgroup\$ – user45941 Mar 8 '16 at 1:12

You must log in to answer this question.

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