Sudhir sharma has Published 1206 Articles

Queries to check if substring[L…R] is palindrome or not in C++ Program

sudhir sharma

sudhir sharma

Updated on 22-Dec-2020 08:41:07

400 Views

In this problem, we are given string str, Q number of queries each consisting of two values L and R for substring[L...R]. Our task is to create a program to solve Queries to check if substring[L…R] is palindrome or not.Problem Description − For solving each query, we need to check ... Read More

Queries to check if it is possible to join boxes in a circles in C++ Program

sudhir sharma

sudhir sharma

Updated on 22-Dec-2020 08:37:44

56 Views

In this problem, we are given a number n that denotes n boxes that lie on the edge of a circle. And there are Q queries each consisting of two integers, a and b. Our task is to create a program to solve queries to check if it is possible ... Read More

Queries to check if a number lies in N ranges of L-R in C++ Program

sudhir sharma

sudhir sharma

Updated on 22-Dec-2020 08:35:43

140 Views

In this problem, we are given a 2-D matrix arr[][2] that consists of n ranges (L, R), L-R. And Q queries each consisting of an integer value. Our task is to create a program to solve the Queries to check if a number lies in N ranges of L-R.Problem Description ... Read More

Queries for number of distinct integers in Suffix in C++ Program

sudhir sharma

sudhir sharma

Updated on 22-Dec-2020 08:33:55

190 Views

In this problem, we are given an array arr[] of n integer values. And Q queries each having an integer k. Our task is to create a program to solve the Queries for number of distinct integers in Suffix.Problem Description − We need to solve queries for distinct integers in ... Read More

Maximums from array when the maximum decrements after every access in C++ Program

sudhir sharma

sudhir sharma

Updated on 22-Dec-2020 08:31:46

97 Views

In this problem, we are given an array arr[] of N integers and an integer m. Our task is to create a program to find the maximums from array when the maximum decrements after every access.Problem Description − We need to find the maximum sum of maximum elements of the ... Read More

Maximum Weight Difference in C++ Program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 13:47:35

179 Views

In this problem, we are given an array arr[] and a number M. Our task is to create a program to calculate the Maximum Weight Difference in C++.Problem descriptionWe will find M elements from the array such that the absolute difference between the sum and the sum of the rest ... Read More

Maximum sum such that no two elements are adjacent Alternate Method in C++ program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 13:45:22

301 Views

In this problem, we are given an array arr[] of size n consisting of positive values. Our task is to create a program to find the maximum subsequence sum in such a way that no two consecutive elements of the array.Problem Description − We need to find the sum of ... Read More

Maximum sum subsequence with at-least k distant elements in C++ program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 13:43:39

229 Views

In this problem, we are given an array arr[] of size n and a number k. Our task is to create a program to find the maximum sum subsequence with atleast k distant elements.Problem Description − We need to find the sum of subarrays such that the elements of the ... Read More

Maximum sum subarray such that start and end values are same in C++ Program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 13:41:11

352 Views

In this problem, we are given an array arr[] of size n consisting of positive values. Our task is to create a program to find the maximum sum subarray such that start and end values are the same.Problem Description − Here, we need to find a subarray such that the ... Read More

Maximum sum possible for a sub-sequence such that no two elements appear at a distance < K in the array in C++ program

sudhir sharma

sudhir sharma

Updated on 09-Dec-2020 13:38:21

218 Views

In this problem, we are given an array arr[] of size n and an integer k. Our task is to create a program to find the maximum sum possible for a subsequence such that no two elements appear at a distance < K in the array.Problem Description − We need ... Read More

Advertisements