• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
January 02, 2024 |1.1K Views
PROBLEM OF THE DAY: 01/01/2024 | Array Pair Sum Divisibility Problem
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Devashish Khare. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Recursion but also build up problem-solving skills.

In this problem, we are given  an array of integers nums and a number k, write a function that returns true if given array can be divided into pairs such that sum of every pair is divisible by k.

Example :

Input : 
nums = [9, 5, 7, 3]
k = 6
Output: 
True

Explanation: 
{(9, 3), (5, 7)} is a possible solution. 9 + 3 = 12 is divisible by 6 and 7 + 5 = 12 is also divisible by 6.

Give the problem a try before going through the video. All the best!!!
Problem Link: https://www.geeksforgeeks.org/problems/array-pair-sum-divisibility-problem3257/1