Comments

Overlook the condition that that co-efficient should be -1,0,1 and got the wrong answer :(. Else did exactly the same.