Target sum pairs problem

Testcase involving negative value is not passing, please check:


u will have to use map