- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Narendra Kumar has Published 196 Articles
![Narendra Kumar](https://www.tutorialspoint.com/articles/images/user_icon.png)
Narendra Kumar
415 Views
In this problem, we are given an array arr. Our task is to create a program that will find the maximum sum of i*arr[i] among all rotations of the given array in C++.Program description − Here, we will find the maximum sum of out the sums of all the elements ... Read More
![Narendra Kumar](https://www.tutorialspoint.com/articles/images/user_icon.png)
Narendra Kumar
156 Views
In this problem, we are given an array and an integer k. Our task is to create a program that will find the maximum sum of lengths of non-overlapping subarrays with k as the max element in c++.Problem description − here, we have an array and an integer k. We ... Read More
![Narendra Kumar](https://www.tutorialspoint.com/articles/images/user_icon.png)
Narendra Kumar
113 Views
In this problem, we are given a binary tree. Our task is to create a program that will find the maximum sum of non-leaf nodes among all levels of the given binary tree in c++.Problem description − we will calculate the sum of all non-leaf nodes of the tree and ... Read More
![Narendra Kumar](https://www.tutorialspoint.com/articles/images/user_icon.png)
Narendra Kumar
556 Views
In this problem, we are given an array and a sum. Our task is to create a program that will find the maximum sum subarray having a sum less than or equal to given sums in c++.We have to find the subarray of any length less than or equal to ... Read More
![Narendra Kumar](https://www.tutorialspoint.com/articles/images/user_icon.png)
Narendra Kumar
103 Views
In this problem, we are given an array. Our task is to create a program that will find maximum sum subarray removing at most one element in c++.Basically, we need to find one element which when removed provides the maximum sum for the elements remaining in the array.Let’s take an ... Read More
![Narendra Kumar](https://www.tutorialspoint.com/articles/images/user_icon.png)
Narendra Kumar
244 Views
In this problem, we are given an array of n integers. Our task is to create a program that will find the maximum value of |arr[i]-arr[j]| + |i-j|.Let’s take an example to understand the problem, Input − array = {4, 1, 2}Output − 4Explanation −|arr[0] - arr[1]|+|0-1| = |4-1| + ... Read More
![Narendra Kumar](https://www.tutorialspoint.com/articles/images/user_icon.png)
Narendra Kumar
136 Views
In this problem, we are given an array of positive integers and a number k. Our task is to create a program that will find the maximum sum of two nonoverlapping subarrays of the given size(k).So, basically we have two print two non-overlapping (distinct) subarrays that have the maximum sum ... Read More
![Narendra Kumar](https://www.tutorialspoint.com/articles/images/user_icon.png)
Narendra Kumar
140 Views
In this problem, we are given an array. Our task is to create a program that will find the maximum triplet sum in the array i.e. find the set of three elements whose sum is maximum.Let’s take an example to understand the problem, Input − array = {4, 6, 1, ... Read More
![Narendra Kumar](https://www.tutorialspoint.com/articles/images/user_icon.png)
Narendra Kumar
206 Views
In this problem, we are given an array of integers and a integers K. our task is to create a program that will find the maximum unique element in every subarray of size K with no duplicates.Let’s take an example to understand the problem, Input −array = {4, 1, 1, ... Read More
![Narendra Kumar](https://www.tutorialspoint.com/articles/images/user_icon.png)
Narendra Kumar
127 Views
In this problem, we are given an array of n integers of range [1, n]. Our task is to create a program that will find the maximum value of |arr[0] – arr[1] - + |arr[1] – arr[2] - + … +|arr[n – 2] – arr[n – 1].Let’s take an example ... Read More