Looking at this question and the comment on one of the answers by Henk Holtermann, I wondered when a question is considered off topic due to a lack of description.
In my opinion (as also noted in a comment) I believe that as long as the problem is described in such a manner that you have a high likelihood of being able to deduce the source of the error, it's not off topic. That doesn't mean I would not potentially downvote the question.
If OP is required to describe the question in detail, the OP would be required to understand the problem in enough detail that the OP would know what was the problem and the appropriate solution.
EDIT Since it would seem that my point is unclear, let me detail it.
In this particular question all the information to find the error is there
Observations from the post
solveBackwardsare functionally correctly (It's stated that when called independently the result is correct)
- The comparison is correct as well. The code is there and can easily be inspected
This leads to the conclusion that it will fail if the result of
solveBackwards overrides the result of
solve (the result of
solve was correct so it must have been changed)
for this to happen
solveBackwards has to mutate the result of
solveBackwards to return the same object that the variable
front refers to, the method needs to have access to it
front is not passed but
grid must be a reference the same object.
front must refer to the same on object (the comparison is correct and the methods work correctly) then it also follows that
solveBackwards mutates the input and returns that as the result which is then assigned to
The error is not copying the content of grid before using it as the argument for
solve backwards. So eventhough part of the code in question is not there logically all the information needed to come to the right answer is