Sudhir sharma has Published 1206 Articles

Find number of unique triangles among given N triangles in C++

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 11:09:35

219 Views

In this problem, we are given three arrays s1[] , s2[] and s3[] of size N, denoting N triangles. Our task is to find the number of unique triangles among given N triangles.For a triangle to be unique, all its side should be unique i.e. no other triangle should have ... Read More

Find number of transformation to make two Matrix Equal in C++

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 11:07:22

133 Views

In this problem, we are given two matrices mat1[][] and mat2[][] of the same size. Our task is to find the number of transformations to make two Matrices Equal.The transformation one matrices are −Select any matrix of the two matrices.Select a row or column from the matricesAdd 1 to all ... Read More

Find number of subarrays with even sum in C++

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 11:04:47

294 Views

In this problem, we are given an array arr[] consisting of N elements. Our task is to find the subarray with even sum.Let’s take an example to understand the problem, Inputarr[] = {2, 1, 3, 4, 2, 5}Output28ExplanationThe subarrays are −{2}, {4}, {2}, {2, 4}, {2, 2}, {1, 3}, {1, ... Read More

Find number of solutions of a linear equation of n variables in C++

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 11:03:18

266 Views

In this problem, we are given a linear equation of n variable for the form, coeff1(var1) + coeff2(var2) + … + coeffn(varn) = valueFind the number of solutions of a linear equation of n variables.Let’s take an example to understand the problem, Inputcoeff[] = {3, 1}, value = 4Output1ExplanationEquation : ... Read More

Find number of Positional Elements in C++

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 11:01:16

112 Views

In this problem, we are given two dimensional arrays mat[n][m]. Our task is to find the number of positional elements.An element is said to be a positional element if the element is either maximum or minimum element of the row or column.Let’s take an example to understand the problem, Inputmat[][] ... Read More

Find number of endless points in C++

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:54:34

52 Views

In this problem, we are given two dimensional arrays mat[n][m]. Our task is to find the number of endless points in the matrix.Any point of the matrix is said to be endless if its next elements are 1. i.e.mat[i][j] is endless when mat[i+1][j] … mat[n][j] and mat[i][j+1] … mat[i][m] are ... Read More

Find number of days between two given dates in C++

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:52:41

4K+ Views

In this problem, we are given two arrays date1[] and date2 consisting of 3 integers which denote the DD-MM-YYYY of daes. Our task is to find the number of days between two given dates.Let’s take an example to understand the problem, Inputdate1[] = {13, 3, 2021}, date2[] = {24, 5, ... Read More

Find number from its divisors in C++

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:46:52

162 Views

In this problem, we are given an array divisors[] consisting of N integers which are the divisors of a number Num. Our task is to find the number from its divisors.The divisor array does not include 1 and the number.Let’s take an example to understand the problem, Inputdivisors[] = {3, ... Read More

C++ program to find Nth term of the series 5, 13, 25, 41, 61…

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:45:14

157 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 5, 13, 25, 41, 61, …Let’s take an example to understand the problem, InputN = 5Output61ExplanationThe series is − 5, 13, 25, 41, 61…Solution ApproachA simple approach to ... Read More

C++ program to find nth term of the series 5, 2, 13 41,...

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:43:50

169 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 5, 2, 19, 13, 41, 31, 71, 57…Let’s take an example to understand the problem, InputN = 5Output41ExplanationThe series is − 5, 2, 19, 13, 41, …Solution ApproachA ... Read More

Advertisements