Given an int array nums and an int target, find how many unique pairs in the array such that their sum is equal to target. Return the number of pairs.
Example 1:
Input: nums = [1, 1, 2, 45, 46, 46], target = 47
Output: 2
Explanation:
1 + 46 = 47
2 + 45 = 47
Example 2:
Input: nums = [1, 1], target = 2
Output: 1
Explanation:
1 + 1 = 2
Watch video Two Sum - Unique Pairs Leetcode | Find unique pairs in the array their sum is equal to target. online without registration, duration hours minute second in high quality. This video was added by user CodingWithKaushik 15 July 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 135 once and liked it 3 people.