Count Couples in Java

In this program you are given with array along with number, Now you need to find pair in the array that matches with given number. Then finally display the count of pairs.



Input
4
1 5 -7 1
6

Output:
2  since pairs are {1,5} and {-7,1}

Comments

Popular posts from this blog

Reasoning-Number Series

Reasoning-Letter Series

Multiply Negative numbers in java