Sunidhi Bansal has Published 1085 Articles

Count of elements of an array present in every row of NxM matrix in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2020 06:11:21

809 Views

We are given an array of integer type elements and a matrix or 2-D array of given row and column size and the task is to calculate the count of elements of an array that are present in each row of a matrix.Input int arr = { 2, 4, 6} and ... Read More

Count pairs from two linked lists whose product is equal to a given value in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2020 06:08:56

121 Views

We are given with two linked lists and the task is to form the pairs using the integer elements of linked lists such that their product is equal to a given value which is let’s say, k. A linked list is a sequence of data structures, which are connected together ... Read More

Count pairs from two linked lists whose sum is equal to a given value in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2020 06:06:40

188 Views

We are given with two linked lists and the task is to form the pairs using the integer elements of linked lists such that their sum is equal to a given value which is let’s say, k. A linked list is a sequence of data structures, which are connected together ... Read More

Count pairs in a sorted array whose product is less than k in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2020 06:03:22

279 Views

We are given a sorted array of integer type elements and an integer variable x and the task is to form the pairs from the given array and calculate the product of elements in the pair and check whether the calculated product is less than k or not.Input int arr[] = ... Read More

Count pairs in a sorted array whose sum is less than x in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2020 06:00:43

650 Views

We are given a sorted array of integer type elements and an integer variable x and the task is to form the pairs from the given array and calculate the sum of elements in the pair and check whether the calculated sum is less than x or not.Input − int ... Read More

Count pairs in an array such that both elements has equal set bits in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2020 05:58:22

289 Views

We are given an array of integer type elements and the task is to form the pairs from the given array and calculate the set bits of elements in the pair and check whether both the elements are having equal number of set bits or not.Set bits in a binary ... Read More

Count pairs in array whose sum is divisible by K in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2020 05:56:19

2K+ Views

We are given an array of integer type elements and the task is to form the pairs from the given array and calculate the sum of elements in the pair and check whether the given sum is divisible by k or not.Input − int arr[] = {4, 1, 2, 0, ... Read More

Count pairs in array whose sum is divisible by 4 in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2020 05:53:31

313 Views

We are given an array of integer type elements and the task is to form the pairs from the given array and calculate the sum of elements in the pair and check whether the given sum is divisible by 4 or not.Input − int arr[] = {4, 1, 2, 0, ... Read More

Count Pairs from two arrays with even sum in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 31-Oct-2020 05:59:58

333 Views

We are given two arrays of integer type elements let’s say, arr_1[] and arr_2[] and the task is to pick one element from arr_1[] and another element from arr_[] to form a pair then calculate the sum of elements in the pair and check whether the resultant sum is even ... Read More

Count pairs whose products exist in array in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 31-Oct-2020 05:58:02

229 Views

We are given an array of integer type elements and the task is to form the pairs from the given array and calculate the product of elements in the pair and check whether the given product is present in the given array or not.Input − int arr[] = {6, 2, ... Read More

Advertisements