Narendra Kumar has Published 196 Articles

Maximum removal from array when removal time >= waiting time in C++

Narendra Kumar

Narendra Kumar

Updated on 03-Jun-2020 08:20:38

43 Views

In this problem, we are given an array of N elements. Our task is to find the maximum removal from the array when removal time >= waiting time.So, here we will be removing the elements of the array. The value of the element of the array denotes the removal time(time ... Read More

Maximum segment value after putting k breakpoints in a number in C++

Narendra Kumar

Narendra Kumar

Updated on 03-Jun-2020 08:19:11

161 Views

In this problem, we are given a string that denotes a large number and an integer k roar denotes the number of breakpoints. Our task is to create a program that will find the maximum segment value after putting L breakpoints in a number.Here, we have to find the maximum ... Read More

Maximum spiral sum in Binary Tree in C++

Narendra Kumar

Narendra Kumar

Updated on 03-Jun-2020 08:17:12

76 Views

In this problem, we are given a binary tree. Our task is to create a program that will find the maximum spiral sum in a binary tree in C++.Spiral sum of a binary tree is the sum of nodes that are encountered in the spiral traversal of the binary tree.In the ... Read More

Maximum steps to transform 0 to X with bitwise AND in C++

Narendra Kumar

Narendra Kumar

Updated on 03-Jun-2020 08:14:40

68 Views

In this problem, we are given an integer X. Our task is to find the total number of steps that are taken to transform from 0 to X.Valid transformation − One step is counted when one transformation takes place from A to B. The condition for the transform to take ... Read More

Maximum Subarray Sum after inverting at most two elements in C++

Narendra Kumar

Narendra Kumar

Updated on 03-Jun-2020 08:13:04

131 Views

In this problem, we are given an array. Our task is to create a program that will find the maximum subarray sum after inverting at most two elements in C++.Problem description − Here, we can have to find the subarray that will produce the maximum sum on inverting the sign ... Read More

Maximum subarray sum by flipping signs of at most K array elements in C++

Narendra Kumar

Narendra Kumar

Updated on 03-Jun-2020 08:11:19

311 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 subarray sum by flipping signs of at most k array elements in C++.Code description − Here, we will have to find at most k elements to ... Read More

Maximum subarray sum in array formed by repeating the given array k times in C++

Narendra Kumar

Narendra Kumar

Updated on 03-Jun-2020 08:08:33

144 Views

In this problem, we are given an array and a number k. Our task is to create a program that will find the maximum subarray sum in an array formed by repeating the given array k time in c++.Problem description − Here, we will find the maximum sum of the ... Read More

Maximum subarray sum modulo m in C++

Narendra Kumar

Narendra Kumar

Updated on 03-Jun-2020 08:06:42

260 Views

In this problem, we are given an array of size n and an integer m. our task is to create a program that will find the maximum subarray sum modulo m in C++.Program description − Here, we will find the maximum value obtained by dividing the sum of all elements ... Read More

Maximum sum after repeatedly dividing N by a divisor in C++

Narendra Kumar

Narendra Kumar

Updated on 03-Jun-2020 08:05:39

69 Views

In this problem, we are given an integer N. Our task is to create a program that will find the maximum sum after repeatedly dividing N by a divisor in C++.Program description − we will divide the number N recursively until it becomes one and then sum up all the ... Read More

Maximum sum of hour glass in matrix in C++

Narendra Kumar

Narendra Kumar

Updated on 03-Jun-2020 08:04:15

317 Views

In this problem, we are given a matrix. Our task is to create a program that finds the maximum sum of the hourglass in a matrix in C++.Program description − Here, we will find the maximum sum of all hourglasses that can be created for the given matrix elements.Hour glass ... Read More

Advertisements