Ayush Gupta has Published 530 Articles

Maximum of four numbers without using conditional or bitwise operator in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 15:15:42

631 Views

In this problem, we are given four integer numbers. Our task is to create a program to find the maximum of four numbers without using conditional or bitwise operator in C++.Code Description − Here, we have four integer values. And we need to find the maximum value out of these ... Read More

Program to find the maximum element in a Matrix in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 15:14:05

1K+ Views

In this problem, we are given a matrix of size nXm. Our task is to create a program to find the maximum element in a Matrix in C++.Problem Description − Here, we need to simply find the largest element of matrix.Let’s take an example to understand the problem, Inputmat[3][3] = ... Read More

Program to find the maximum difference between the index of any two different numbers in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 15:12:47

375 Views

In this problem, we are given an array arr[] consisting of n integers. Our task is to create a program to find the maximum difference between the index of any two different numbers in C++.Code Description − Here, we need to find the maximum difference between the index of integer ... Read More

Program to find the minimum (or maximum) element of an array in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 14:21:28

13K+ Views

In this problem, we are given an array arr[] of n integers. Our task is to create a program to find the minimum and maximum element of an array in C++.Problem Description − Here, we have an array arr[]. The contains n integer values. We have to find the maximum ... Read More

Maximum product of subsequence of size k in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 14:20:26

483 Views

In this problem, we are given an array arr[] of integers and a number k. Our task is to create a program to find the Maximum product of subsequence of size k in C++.Problem Description − Here, we need to find the subsequence of size k, 1

Maximum product of two non-intersecting paths in a tree in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 14:19:33

278 Views

In this problem, we are given an undirected connected tree T with n nodes. Our task is to create a program to find the Maximum product of two nonintersecting paths in a tree in C++.Problem Description − To find the maximum product of two nonintersecting paths in a tree. We ... Read More

Maximum product quadruple (sub-sequence of size 4) in array in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 14:18:33

387 Views

In this problem, we are given an array arr[]. Our task is to create a program to find the Maximum product quadruple (sub-sequence of size 4) in array in C++.Code description − Here, we need to find a quadruple (sub-sequence of size 4) such that the product of all elements ... Read More

Maximum Product Subarray - Using Two Traversals in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 14:17:28

198 Views

In this problem, we are given an array arr[] of integers. Our task is to create a program to find the Maximum Product Subarray - Using Two Traversals in C++.Problem description − Here in the array, we will find the maximum product subarray using two traversals one from index 0 ... Read More

Maximum Product Subarray | Added negative product case in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 14:16:48

190 Views

In this problem, we are given an array of integers(positive as well as negative). Our task is to create a program to calculate the Maximum Product Subarray in C++.Problem Solution − Here, we have an array that contains positive, negative, and zero numbers. We need to find the product of ... Read More

Maximum profit after buying and selling the stocks in C++

Ayush Gupta

Ayush Gupta

Updated on 15-Sep-2020 14:15:16

825 Views

In this problem, we are given an array stkprice[] that denotes the price of a certain stock on i-th day. Our task is to create a program to calculate Maximum profit after buying and selling the stocks in C++.Problem Description − Here, we need to check when can be bought ... Read More

Advertisements