## Count of integers that divide all the elements of the given array

Given an array arr[] of N elements. The task is to find the count of positive integers that divide all the array elements. Examples: Input:… Read More »

- Find the sum of digits of a number at even and odd places
- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Greedy approach vs Dynamic programming
- Optimal File Merge Patterns
- Find maximum meetings in one room
- Minimum number of pairs required to make two strings same
- Given count of digits 1, 2, 3, 4, find the maximum sum possible
- Find the maximum possible value of a[i] % a[j] over all pairs of i and j
- Maximum number of candies that can be bought
- Maximum Length Chain of Pairs | Set-2
- Find minimum changes required in an array for it to contain k distinct elements
- Find the minimum number of steps to reach M from N
- Unbounded Fractional Knapsack
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Minimum cuts required to convert a palindromic string to a different palindromic string
- Maximize the value of the given expression
- Count common elements in two arrays containing multiples of N and M
- Create a Sorted Array Using Binary Search
- Maximal Disjoint Intervals
- Maximum distance between two unequal elements
- Find minimum length sub-array which has given sub-sequence in it
- Count the pairs of vowels in the given string
- Divide a number into two parts
- Length of the longest substring with no consecutive same letters
- Find smallest number K such that K % p = 0 and q % K = 0
- Minimum deletions required to make GCD of the array equal to 1
- Largest substring with same Characters
- Move all zeros to start and ones to end in an Array of random integers
- Find the Kth smallest element in the sorted generated array

Given an array arr[] of N elements. The task is to find the count of positive integers that divide all the array elements. Examples: Input:… Read More »

Given a string. The task is to find the maximum number P, such that given string can be partitioned into P contiguous substrings such that… Read More »

Given an integer array, consisting of positive weights “W” and there values “V” respectively as a pair and some queries consisting of an integer ‘C’… Read More »

Given a number N, find the minimum possible sum of digits that can be obtained from a positive Multiple of N. Constraints : 1<=N<=10^5. Examples:… Read More »

Given an array arr of size N and a number K. The task is to find the minimum elements to be replaced in the array… Read More »

Given a number N. The task is to find the minimum number of binary strings required to represent the given number as the sum of… Read More »

There is one meeting room in a firm. There are N meetings in the form of (S[i], F[i]) where S[i] is the start time of… Read More »

Given two arrays X and L of same size N. Xi represents the position in an infinite line. Li represents the range up to which… Read More »

Given a string s of size N. The task is to find the largest substring which consists of same characters Examples: Input : s =… Read More »

Given a balanced parenthesis string which consists of ‘(‘ and ‘)‘. The task is to find the number of balanced parenthesis substrings in the given… Read More »

Given a number N. The task is to find the number of ways you can draw N chords in a circle with 2*N points such… Read More »

Given an array arr[] of N non-negative integers. The task is to find the length of the longest sub-array such that XOR of all the… Read More »

Given an array arr[] of N elements, the task is to find the length of the smallest sub-array which has sequence {0, 1, 2, 3,… Read More »

Given an array of pairs of numbers of size N. In every pair, the first number is always smaller than the second number. A pair… Read More »

Given weights and values of n items, the task is to put these items in a knapsack of capacity W to get the maximum total… Read More »