Queries to increment array elements in a given range by a given value for a given number of times
Given an array arr[] of N positive integers and M queries of the form {a, b, val, f}. The task is to print the array… Read More »
Given an array arr[] of N positive integers and M queries of the form {a, b, val, f}. The task is to print the array… Read More »
Given a matrix mat[][] of dimension NxM, the task is to count the number of unique paths from the top-left cell, i.e. mat[0][0], to the… Read More »
Given two arrays arr[] of N integers and W[] of N weights where W[i] is the weight for the element arr[i]. The task is to… Read More »
Given an array arr[] of N integers, the task is to find the count of all subarrays from the given array of at least size… Read More »
Given an array arr[] consisting of N positive integers and an integer K. In one operation, select an array element, add it to the sum… Read More »
Given a binary matrix arr[][] of dimensions N * M , the task is to count the number of right-angled triangles that can be formed… Read More »
Given an array arr[] consisting of N integers, the task is to find the count of unordered pairs in the given array whose sum contains… Read More »
There is a one-dimensional garden of length N. In each position of the N length garden, a fountain has been installed. Given an array a[]such… Read More »
Given an array arr[] of size N, the task is to find the bitwise XOR of all possible unordered pairs of the given array. Examples:… Read More »
Given an array arr[] of size N, the task is to count the number of triplets (arr[i], arr[j], arr[k]) such that arr[i] * arr[j] =… Read More »
Given an array of strings S[] consisting of N distinct strings of length M. The task is to generate the longest possible palindromic string by… Read More »
Given an array arr[ ] consisting of N integers, the task is to determine the maximum number of perfect Numbers in any subarray of size… Read More »
Given an array arr[] consisting of N integers and an integer K, the task is to select some non-adjacent array elements with maximum possible sum… Read More »
Given an array arr[] consisting of N integers, the task is to check if it is possible to divide the entire array into pairs such… Read More »
Given an array, arr[ ] of size N, the task is to rearrange the given array such that the product of all the elements of… Read More »