## Count number of increasing sub-sequences : O(NlogN)

Given an array arr[] of length N, the task is to find the number of strictly increasing sub-sequences in the given array. Examples: Input: arr[]… Read More »

- Maximum subsequence sum such that all elements are K distance apart
- Number of Subsequences with Even and Odd Sum
- Subsequence X of length K such that gcd(X[0], X[1]) + (X[2], X[3]) + ... is maximized
- Print all Increasing Subsequence of a List
- Number of Subsequences with Even and Odd Sum | Set 2
- Count the number of subsequences of length k having equal LCM and HCF
- Longest alternative parity subsequence
- Maximum Bitwise AND value of subsequence of length K
- Product of Primes of all Subsets
- Find the count of subsequences where each element is divisible by K
- Concatenate the strings in an order which maximises the occurrence of subsequence "ab"
- Minimum cost of choosing 3 increasing elements in an array of size N
- Number of K length subsequences with minimum sum

Given an array arr[] of length N, the task is to find the number of strictly increasing sub-sequences in the given array. Examples: Input: arr[]… Read More »

Given a binary string S of length N, the task is to find the length of the longest sub-sequence in it which is divisible by… Read More »

Given an array arr[] of N integers, the task is to find the count of all the subsequences of the array that have positive product.… Read More »

Given a binary string str of length N, the task is to find the count of subsequences of str which are divisible by 2. Leading… Read More »

Given a string S of length N and an integer K, the task is to find the length of longest sub-sequence such that the difference… Read More »

Given an array arr, the task is to find the length of Longest Increasing Sequence using Binary Indexed Tree (BIT) Examples: Input: arr = {6,… Read More »

A sequence of positive real numbers S1, S2, S3, …, SN is called a superincreasing sequence if every element of the sequence is greater than… Read More »

Given two arrays S[] and T[] of size N and M respectively. The task is to find the pairs of subsequences of S[] and subsequences… Read More »

Given an array arr[] of N elements and a positive integer K such that K ≤ N. The task is to find the number of… Read More »

Given a sequence arr of N positive integers, the task is to find the length of the longest subsequence such that xor of adjacent integers… Read More »

Given an array arr[], the task is to find the longest subsequence with a given OR value M. If there is no such sub-sequence then… Read More »

Given an array arr[] and an integer M, the task is to find the longest subsequence with a given AND value M. If there is… Read More »

Given an array arr[] and an integer M, the task is to find the length of the longest subsequence whose sum is divisible by M.… Read More »

Given an array arr[], the task is to find the longest subsequence with a given AND value M. If there is no such sub-sequence then… Read More »

Given an array arr[] of length N, the task is to find the length of the largest sub-sequence with non-negative sum. Examples: Input: arr[] =… Read More »