## Find the count of subsequences where each element is divisible by K

Given an array arr[] and an integer K, the task is to find the total number of subsequences from the array where each element is… Read More »

- Maximum sum such that no two elements are adjacent | Set 2
- Maximum Sum Subsequence of length k
- Find the minimum number of elements that should be removed to make an array good
- Maximum subsequence sum such that all elements are K distance apart
- Total number of odd length palindrome sub-sequence around each centre
- Number of subsequences with zero sum
- Product of all Subsequences of size K except the minimum and maximum Elements
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Number of Subsequences with Even and Odd Sum
- Divide array into increasing and decreasing subsequence without changing the order
- Find the longest subsequence of an array having LCM at most K
- Find minimum length sub-array which has given sub-sequence in it
- Maximum sum possible for a sub-sequence such that no two elements appear at a distance < K in the array
- Subsequence X of length K such that gcd(X[0], X[1]) + (X[2], X[3]) + ... is maximized
- Longest subsequence with first and last element greater than all other elements
- Longest subsequence such that every element in the subsequence is formed by multiplying previous element with a prime
- Print all Increasing Subsequence of a List
- Find all combinations of two equal sum subsequences
- Number of sub-sequence such that it has one consecutive element with difference less than or equal to 1
- Number of N length sequences whose product is M
- Count of sub-sequences which satisfy the given condition
- Longest sub-sequence that satisfies the given conditions
- Maximum sum in an array such that every element has exactly one adjacent element to it
- Longest alternative parity subsequence
- Distinct strings such that they contains given strings as sub-sequences
- Number of Subsequences with Even and Odd Sum | Set 2
- Longest subsequence with at least one character appearing in every string
- Maximum Bitwise AND value of subsequence of length K
- Product of Primes of all Subsets
- Maximum sub-sequence sum such that indices of any two adjacent elements differs at least by 3

Given an array arr[] and an integer K, the task is to find the total number of subsequences from the array where each element is… Read More »

Given an array arr[] of N integers and another integer K. The task is to find the maximum sum of a subsequence such that the… Read More »

Given an array arr[] of size N. The task is to find the number of subsequences whose sum is even and the number of subsequences… Read More »

Given an array, find the number of subsequences whose sum is even and the number of subsequences whose sum is odd. Example : Input: arr[]… Read More »

Given a list or array of integer, the task is to print all such subsequences of this list such in which the elements are arranged… Read More »

Given an array a of size N. The task is to print the length of the longest alternative odd/even or even/odd subsequence. Examples: Input: a[]… Read More »

Given an array a of size N. The task is to find a subsequence X of length K such that gcd(X[0], X[1]) + (X[2], X[3])… Read More »

Given an array a of size N and an integer K. The task is to find the maximum bitwise and value of elements of any… Read More »

Given an array a[] of size N. The value of a subset is the product of primes in that subset. A non-prime is considered to… Read More »

Given an array arr[] of integers, the task is to find all possible ways the array could be split into two subsequences such that the… Read More »

Given an integer N, the task is to check if the product of every consecutive set of digits is distinct or not. Examples: Input: N… Read More »

Given a string array arr[], the task is to find the longest sub-sequence of the array with at least one character appearing in all the… Read More »

Given a sorted array of N integers. The task is to find the longest subsequence such that every element in the subsequence is reachable by… Read More »

Given two strings str1 and str2 of lengths M and N respectively. The task is to find all the distinct string of length M +… Read More »

Given two integers N and M, the task is to find the count of possible sequences a1, a2, … of length N such that the… Read More »