Given an array, arr[] of size N and an integer K. If a value in arr[] is less than or equal to K, then that… Read More

Given a linked list lis of length N, where N is even. The task is to maximize the sum of two equidistant nodes from the… Read More

Given source (X1, Y1) as (0, 0) and a target (X2, Y2) on a 2-D plane. In one step, either of (X1+1, Y1+1) or (X1+1,… Read More

Given a number N, the task is to print the digits of N which divide N. Example: Input: N = 234Output: 2 3 Input: N… Read More

Given a 2D matrix arr[] of size N*M, the task is to find the number of rows and columns having all primes. Examples: Input: arr[]=… Read More

Given an N-array tree root and an integer K, the task is to print all the cousins of node K. Note: Two nodes are considererd… Read More

Given an array arr[]. The task is to find the number of iterations required to make the minimum element in the array as 0. In… Read More

Given a String ph[], the task is to find a new number for the user, based on following conditions: The new number will also start… Read More

Given a String ph[], the task is to find the absolute difference of consecutive elements and insert the result in between the consecutive elements. By… Read More

Given two integers N(denoting number of ‘1’) and M(denoting number of ‘0’). The task is to maximize the number of “001” or “110” patterns that… Read More

Given an array arr[] of size N, the task is to find the number of operations to convert array elements to zero by decrementing the… Read More

Given an array, arr[] of size N., The task is to perform minimum increment or decrement operations on the elements of the array, to make… Read More

Given two arrays arr[] containing N integers and a mask[] of an odd size. The task is to replace every array element with the value… Read More

Given an integer capacity the maximum number of the processes handled by a CPU at any given time and a 2-D array request[][] is given,… Read More

Given a string str[] of length N of lowercase characters containing 0 or more vowels, the task is to find the count of vowels that… Read More