Ayush Gupta has Published 530 Articles

Maximum Subarray Sum Excluding Certain Elements in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 14:07:10

134 Views

In this tutorial, we will be discussing a program to find maximum Subarray Sum Excluding Certain Elements.For this we will be provided with two arrays of size M and N. Our task is to find a sub-array in the first array such that no element inside the subarray is present ... Read More

Maximum subarray size, such that all subarrays of that size have sum less than k in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 14:05:05

151 Views

In this tutorial, we will be discussing a program to find maximum subarray size, such that all subarrays of that size have sum less than k.For this we will be provided with an array of size N and an integer k. Our task is to find the length of subarray ... Read More

Maximum students to pass after giving bonus to everybody and not exceeding 100 marks in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 14:01:45

146 Views

In this tutorial, we will be discussing a program to find maximum students to pass after giving bonus to everybody and not exceeding 100 marks.For this we will be provided with an array containing marks of N students. Our task is to get more student pass the exam (50 marks ... Read More

C++ program to implement Run Length Encoding using Linked Lists

Ayush Gupta

Ayush Gupta

Updated on 10-Jul-2020 05:52:47

299 Views

In this tutorial, we will be discussing a program to implement Run Length Encoding using Linked Lists.For this we will be given with a linked list. OUr task is too encode the elements of the Linked List using Run Length Encoding.For example, if the elements of the linked list are ... Read More

C++ program to find the rate percentage from compound interest of consecutive years

Ayush Gupta

Ayush Gupta

Updated on 09-Jul-2020 08:55:38

174 Views

In this tutorial, we will be discussing a program to find the rate percentage from compound interest of the consecutive years.For this, we will be provided with two integers say A and B that are the interests of two consecutive years. Our task is to find the rate of interest ... Read More

C program to find the Roots of Quadratic equation

Ayush Gupta

Ayush Gupta

Updated on 09-Jul-2020 08:55:12

3K+ Views

In this tutorial, we will be discussing a program to find the roots of the Quadratic equation.Given a quadratic equation of the form ax2 + bx + c. Our task is to find the roots x1 and x2 of the given equation.For this, we are using the deterministic method, in ... Read More

C++ program to find the side of the Octagon inscribed within the square

Ayush Gupta

Ayush Gupta

Updated on 09-Jul-2020 08:54:48

108 Views

In this tutorial, we will be discussing a program to find the side of the octagon inscribed within a given square.For this, we will be given with the side of a square and our task is to find the side of the largest octagon that can be inscribed in it.Finding ... Read More

C++ program to find the smallest element among three elements

Ayush Gupta

Ayush Gupta

Updated on 09-Jul-2020 08:54:23

2K+ Views

In this tutorial, we will be discussing a program to find the smallest element among the provided three elements.We will be provided with three elements/ integers and our task is to compare them and find the smallest element/ integer among them.Example#include using namespace std; int main() {    int ... Read More

C++ program to find the Sum of each Row and each Column of a Matrix

Ayush Gupta

Ayush Gupta

Updated on 09-Jul-2020 08:53:58

2K+ Views

In this tutorial, we will be discussing a program to find the sum of each row and each column for a given matrix.For this, we will be given with a say A*B matrix. Our task is to traverse through all the elements of the matrix and find the sum of ... Read More

C++ program to find the sum of the series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + … + (n*n)

Ayush Gupta

Ayush Gupta

Updated on 09-Jul-2020 08:53:33

346 Views

In this tutorial, we will be discussing a program to find the sum of the given series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + … + (n*n).For this, we will be given with the value of n and our task is to add up every term starting ... Read More

Advertisements