Q1. Pairs with given sum II

Q2. Pairs with Given Difference