Sudhir sharma has Published 1149 Articles

Find other two sides and angles of a right angle triangle in C++

sudhir sharma

sudhir sharma

Updated on 16-Mar-2021 04:52:08

536 Views

In this problem, we are given an integer a denoting one side of a right angle triangle. We need to check whether it is possible to have a right angle triangle with side a. If it is possible, then find the other two sides and angle of a right angle ... Read More

Find orientation of a pattern in a matrix in C++

sudhir sharma

sudhir sharma

Updated on 16-Mar-2021 04:48:58

170 Views

In this problem, we are given a matrix consisting of character values that make a pattern, we are also given a pattern to be found. Our task is to find the orientation (horizontal or vertical) of a pattern in a matrix.Let’s take an example to understand the problem, Inputmat[][] = ... Read More

C++ program to find numbers with K odd divisors in a given range

sudhir sharma

sudhir sharma

Updated on 16-Mar-2021 04:45:02

237 Views

In this problem, we are given three integer values, L, R, and k. Our task is to find numbers with K divisors in a given range. We will be finding the count of numbers in the range [L, R] that have exactly k divisors. We will be counting the 1 ... Read More

Find numbers with K odd divisors in a given range in C++

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 11:11:24

210 Views

In this problem, we are given three integer values, L, R, and k. Our task is to find numbers with K odd divisors in a given range. We will be finding the count of numbers in the range [L, R] that have exactly k divisors.We will be counting the 1 ... Read More

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

sudhir sharma

sudhir sharma

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

313 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

215 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

368 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

346 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

204 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

114 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

Advertisements