Sunidhi Bansal has Published 1085 Articles

Minimum Sum Path In 3-D Array in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 08:35:04

185 Views

We are given a cube which can be formed using a 3-D array as cube[length][breadth][height]. The task is to calculate the minimum sum path which will be achieved by traversing the cube and hence print the result.Let us see various input output scenarios for this -In − int cube[length][breadth][height] = { ... Read More

Midy’s theorem in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 08:28:56

240 Views

We are given integer values as a_num that will store the numerator and p_den that will store the denominator which should be a prime number. The task is to check whether the operations performed on a_num after dividing with p_den proves the midy’s theorem or not.Steps to prove Midy’s theorem ... Read More

Maximum Subarray Sum in a given Range in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 08:23:39

298 Views

We are given with an array of integer elements of any given size. The task is to find the maximum sum which will be calculated by forming the subarrays from the given array within the given range which can be started from any possible index value in an array.Let us ... Read More

Minimize the sum of roots of a given polynomial in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 08:18:10

132 Views

We are given with an array of integer elements representing the coefficient values of a polynomial. The size of an array will be ‘n’ i.e. number of elements in an array. The degree of polynomial always starts with n-1 as there will be one constant value at the end of ... Read More

Minimum Word Break Problem in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 07:57:01

306 Views

We are given an array string of words of any given size and the task is to break the words in all possible ways such that after the break the string formed should be a valid string and we have to calculate all such minimum word break as per the ... Read More

Mid-Point Line Generation Algorithm in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 07:49:54

4K+ Views

A line connects two points. It is a basic element in graphics. To draw a line, you need two points between which you can draw a line on a screen and in terms of graphics we refer to the points as pixels and every pixel is associated with integer coordinates. ... Read More

Maximize the subarray sum after multiplying all elements of any subarray with X in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 07:42:24

299 Views

We are given with an integer array and an integer variable i.e. ‘X’. The task is to firstly form the subarray from the given array and then multiply all the elements of a subarray with an integer X. At last find out the elements that will contribute the maximum sum.Let ... Read More

Maximize the sum of array by multiplying prefix of array with -1 in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 07:30:50

292 Views

We are given an integer array and the task is to firstly fetch the prefix of an array and then multiply it with -1, secondly calculate the prefix sum of an array and lastly find the maximum sum from the prefix array generated.Prefix array is generated as −First element of ... Read More

Minimum sum submatrix in a given 2D array in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 22-Oct-2021 06:40:12

606 Views

We are given a 2-D array of integer elements forming the matrix. The task is to calculate the count of minimum sum by pulling the submatrix from the matrix so formed.Let us see various input output scenarios for this -In −int matrix[size][size] = { {2, 3, -1, 5}, {-2, 9, ... Read More

Minimum no. of iterations to pass information to all nodes in the tree in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 21-Oct-2021 13:41:59

806 Views

We are given a tree data structure with ‘n’ number of nodes. The given tree will have a root node and respective children which can be any number and further child can have any number of children. The task is to find the minimum number of iterations required by a ... Read More

Advertisements