Given a zero-indexed array P containing N integers (a permutation of number from 1 to N), where P[i] denotes the number of the rose which will start blooming on day number i+1, ...read more
Given an array arr[] of N points. The task is to sort these points according to it’s distance from the origin. Examples: Input: arr[] = { {5,0}, {4,0}, {3,0}, {2,0}, {1,0} } ...read more
Given a sequence A1,A2,A3,….,An and an empty sequence B. You need to find M minimum number of times this sequence should be appended in B, so that the length of longest increasing ...read more
Given 2 strings A and B, the task is to count the number of substrings of A which are also present in B. Example: Input: a="plu" b="Cplusplus" Output: 6 Explanation: p, l, ...read more
Given an array arr, the task is to find the sum of the elements which have composite frequencies in the array. Examples: Input: arr[] = {5, 4, 6, 5, 4, 6} Output: ...read more
Given an array arr, the task is to find the product of the elements which have composite frequencies in the array. Examples: Input: arr[] = {4, 6, 5, 4, 6} Output: 5 ...read more
Given a positive number N denoting the number of People, an array ‘Heights‘ which contains the heights of N persons standing in a queue, and an array ‘Infronts‘ whose each entry gives ...read more
Given numbers from 1 to 10^10, we need to select that maximum number i from the range such that A*b(i)+C*i does not exceed m. A and C will be given and b(i) means ...read more
One combination of made up of N different things. You are given an array of length N which indicate the amount of N different things which one combination contain. You are given ...read more
Given an array arr[] of size N, find the length of its longest subarray such that the sum of its elements not divisible by K, or determine that such subarray does not ...read more