Check If An Array Can Be Divided Into Pairs Whose Sum Is Divisible By K
easy
1. You are given an array(arr) of integers and a number K. 2. You have to find if the given array can be divided into pairs such that the sum of every pair is divisible by k.
Constraints
1 <= N <= 10^6 1 <= arr[i] <= 10^4 1 <= K <= 10^4
Format
Input
A number N arr1 arr2.. N numbers A number K
Output
true or false.
Example
Sample Input
4
9 7 5 3
6
Sample Output
true
Question Video