My question on stackoverflow was first marked as 'unclear'. I edited the question and raised a flag. After a few days, it was reopened and in a few hours it has been flagged as off-topic with the following reason:

"Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist"

I want to say that my question is not asking for any code. If the answerer decides to give some codes, I don't mind. In my question, I have stated the path I would take to solve the question and have asked for opinions on how to tackle it in a more efficient way.

Anyway the question being a few days old, I don't expect any more answers on it. But I'm sure it would have gotten few more answers if it wasn't closed earlier.

  • 3
    Well, part of the problem is you're asking for opinions.
    – ale
    Dec 6 '13 at 5:37
  • I understand where you are coming from. But to be to the point, your question does not follow the typical template. Most of the time a post will state the issue, offer their partial solution, which will then allow the community to offer their solutions. Your post would have likely been better received on reddit, or something of the like.
    – davelupt
    Dec 6 '13 at 5:40
  • @Krampus Well I think it is more like I have a solution (atleast to the first part of the question) and I know it is not a efficient way. So, I'm asking how it is to be solved. It's not like someone will not agree with another person's reply. Each reply in this case can either be right or wrong nothing in between.
    – aste123
    Dec 6 '13 at 5:40
  • Might be better on programmers.stackexchange.com Dec 6 '13 at 5:41
  • @Max Vernon I'm not really a professional programmer, just trying to learn the basic concepts of some programming languages. I feel programmers.stackexcahnge.com is for more advanced topic
    – aste123
    Dec 6 '13 at 5:43
  • @davelupt So do you think, my question can be rephrased to meet the site's requirements?
    – aste123
    Dec 6 '13 at 5:45
  • Stacks and pointers etc are far beyond your basic everyday code monkey topics. Programmers.se is for conceptual questions regarding coding, which is I think exactly what your question is. Dec 6 '13 at 5:47

The first issue I see with your question is that it's not one question but two different questions packed into one. Don't do that. Focus on one problem at a time. One question per question.

The first part of your question doesn't actually contain a problem. You've got an idea of a solution, and don't appear to have tried it out. So you don't know if you have a problem yet (your idea might very well work). And then you ask for "better" ways to accomplish a thing when it's not clear what your requirements or your implementation is. That's impossible to answer correctly. There's always several ways to do stuff, and the "best" one will depend on a whole lot of factors, including how familiar you are with the (potentially numerous) alternatives.

Your second question has the same sort of problem for the "most preferred" way of doing things. It also, in my opinion, fails the "do your research" part - there are lots of examples of stack (and list, and queue, and ...) containers out there. What the basic building blocks of such a structure needs to contain can be easily found out with a search. Maybe your case requires something above the basic structure, but you've not given any specifics, so there's not much that can be said except providing a sample implementation - but Google and Bing can already do that quite efficiently (most likely pointing you back to Stack Overflow for at least some of the first hits).

I believe that second problem is why that close reason was selected. The impression I get from reading your question is that you haven't actually tried things out yet, or looked at existing implementations. (I know very well this might not be the case, but all I can go by is what's written in your post.)

You'll get much better results from Stack Overflow if you show an actual problem. This usually requires that you've coded up something (even if it's pseudo-code).

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