0

Some time ago, I asked an optimization question that received a few downvotes because I had described my initial solution in the abstract instead of posting actual code.

I then added the code snippet and answered my question with a more optimized, if not completely idiomatic, version, but it's still sitting at a negative score.

What other improvements can I make to the question?

4
  • 4
    From the question: "This works as intended, but is much more verbose than the average rust code that tackles iterative problems like these.". This would make the question off-topic. If the code works, and you simply want to rewrite the code, SO would not be the right place for the question to be.
    – yivi
    Mar 21, 2022 at 9:53
  • I was under the impression that I was missing a precise idiom for this kind of subsequence iteration. This operation is hard to describe succinctly, so I thought the question might be useful to future users who're trying to accomplish it
    – none none
    Mar 21, 2022 at 9:55
  • 2
    is that nit something more fitting to code review. even after the edit, and prior it should be closed of lack of details
    – nbk
    Mar 21, 2022 at 10:01
  • Assuming it's not a duplicate, the original question seems fine to me, although it could be asked more explicitly. Showing a code attempt is probably a net negative overall. However, it's not clear to me how this is an optimization question. If you want simple or "elegant" code to accomplish a task, that is a completely separate concern from runtime, memory usage etc. Jan 6 at 1:07

0

You must log in to answer this question.