# Good subsequence hackerrank

But product of elements of **subsequence** {2,5}, {3,5}, {2,3,5} is more than p i.

Here is a link to this challenge: A **subsequence** is a new string that is derived.

Instructions.

oo

## ys

.

ln

## bi

.

tg

## gx

Here is a link to this challenge: A **subsequence** is a new string that is derived.

## bl

.

## yl

A **good** **subsequence** of this string is a **subsequence** which contains distinct characters only.

## ug

.

## np

In this HackerEarth **Good** **Subsequences** problem solution You are given a string S consisting of lowercase alphabets.

## qa

In this video, Vagish Yagnik has explained the solution to a #**HACKERRANK** Problem #XorSequence using Binary Search.

## cy

fc-falcon">This is called the Longest Increasing **Subsequence** (LIS) problem.

## cn

In the second testcase, the maximum length of a **good** **subsequence** is 2.

## zp

Then the following subsequences are **good**- {0}, {1}, {2}, {0, 1}, {1, 2}, {0, 2}.

## np

.

## nu

Arpit's Newsletter read by 17000+ engineers.

## oj

fc-falcon">Common Child on **HackerRank**: https://www.

## ya

So there are 2 3 - 1 = 7 **subsequences**.

## vh

Example 2:.

## oa

In the second testcase, the maximum length of a **good**** subsequence** is 2.

## dr

## fz

.

## jw

2.

Step 4: if the **subsequence** is not in the list then recur.

Let countSub (n) be count of **subsequences** of first n characters in input string.

cx