PrepSwift: Three Consecutive Integers - Quiz Doubt

In the above question, I did this question differently and got the right answer but my method seems wrong now. Attaching my solution below.

Was equating the sum to 0 a wrong move? A little lost because the answer was right. Would love if someone could shed light on this!

You were lucky. Your solution is not technically faulty per se, and that is only because you equated the sum into something that can be represented as three consecutive integers (-1, 0 and 1 in this case). Had you equated the sum to -1 or 1 for instance, you’re likely to run into trouble because the sum of three consecutive integers cannot be -1 or 1.

Oh right. Yeah definitely got lucky here, wouldn’t repeat this approach.