Sunidhi Bansal has Published 1085 Articles

Count BST nodes that lie in a given range in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 12:11:37

267 Views

We are given a binary search tree made up of nodes and also a range and the task is to calculate the count of nodes that lies in the given range and display the result.A Binary Search Tree (BST) is a tree in which all the nodes follow the below-mentioned ... Read More

Count maximum elements of an array whose absolute difference does not exceed K in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 12:06:27

563 Views

We are given an array let’s say, arr[] of integer elements of any given size and a positive integer k and the task is to calculate the count of those element pairs whose absolute difference doesn’t exceed the given integer k.Arrays a kind of data structure that can store a ... Read More

Count divisors of array multiplication in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 12:02:31

307 Views

We are given an array let’s say, arr[] of integer elements of any given size and the task is to calculate the count of the factors of a number calculated by multiplying all the array elements.Arrays a kind of data structure that can store a fixed-size sequential collection of elements ... Read More

Count array elements that divide the sum of all other elements in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 12:00:37

325 Views

We are given an array let’s say, arr[] of integer values and the task is to calculate the count of array elements that divides the sum of all other elements.Arrays a kind of data structure that can store a fixed-size sequential collection of elements of the same type. An array ... Read More

Count distinct pairs from two arrays having same sum of digits in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 11:57:58

251 Views

We are given with two arrays let’s say, arr_1[] and arr_2[] having integer values and the task is to calculate the count of distinct pairs having the same sum of digits. It means, one value should be selected from an arr_1[] and second value from arr_2[] to form a pair ... Read More

Count number of distinct pairs whose sum exists in the given array in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 11:53:57

559 Views

We are given an array of, let's say, arr[] of integer values of any respective size and the task is to calculate the count of the number of distinct pairs available in a given array whose sum also exists in the same array.Arrays a kind of data structure that can ... Read More

Count elements that are divisible by at-least one element in another array in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 11:51:29

383 Views

We are given two arrays, let's say arr_1[] and arr_2[] both containing integer values and the task is to calculate the count of elements that are divisible by at least one element in another array. It means there we need to count those elements having at least one factor in ... Read More

Count divisible pairs in an array in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 11:46:43

275 Views

We are given an array of any size containing integer elements and the task is to calculate the count of pairs in an array such that one element of a pair divides another element of a pair.Arrays a kind of data structure that can store a fixed-size sequential collection of ... Read More

Count number of elements between two given elements in array in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 10:42:22

1K+ Views

We are given an array containing integer elements and two numbers start and end and the task is to calculate the count of elements present between start and end in an array.Arrays a kind of data structure that can store a fixed-size sequential collection of elements of the same type. ... Read More

Count elements present in first array but not in second in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 10:40:00

132 Views

We are given an array of any size containing integer elements and the task is to calculate the count of elements that are present in the first array but not in the second array..Arrays a kind of data structure that can store a fixed-size sequential collection of elements of the ... Read More

Advertisements