2
\$\begingroup\$

https://codereview.stackexchange.com/q/12526/18427

It failed the game/contest because of the time constraint. My thoughts are that this is a review for speed. Bearing that in mind, I think it is on-topic. Any other thoughts?

\$\endgroup\$
2
\$\begingroup\$

I agree that we should not close questions as "Not working code" because of the time constraint. The code itself is working, it is just too slow. (The same goes for some PHP questions since PHP has a built-in default limit of 30 seconds for script execution)

I, however, voted to close as "Unclear what you are asking" because the six tests are not included in the code, therefore it's not possible for us to see the problem that easily.

\$\endgroup\$
  • \$\begingroup\$ he did give sample input and the code that he is using. \$\endgroup\$ – Malachi Dec 12 '13 at 15:31
  • 1
    \$\begingroup\$ @Malachi Yes, but that's only one example. It is mentioned in the question that "Out of 6 test cases First 3 are passed and remaining 3 are failing with execution time of 5.2XXX secs." \$\endgroup\$ – Simon Forsberg Dec 12 '13 at 15:36
1
\$\begingroup\$

I agree that we should not close the question (and when it came up in my review queue, I voted Keep Open....).

Also, I think it is very clear what is being asked (once you get around the long-winded description) -- putting words in the asker's mouth he's saying:

My code works, but it's slow. Any suggestions?

\$\endgroup\$

You must log in to answer this question.

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