Arrays-Target sum pairs


Can anyone point out my mistake in approaches as in one of the test cases i am getting TLE!.??

please see my code…once because i am not getting one of the testcases passed out of 4.