What’s the minimum length of a subsequence? Lets say that A = 98 and B = 150; will (just) the number 100 satisfy the requirement? Or is the minimum length of a subsequence at least >= 2?

Thanks.

What’s the minimum length of a subsequence? Lets say that A = 98 and B = 150; will (just) the number 100 satisfy the requirement? Or is the minimum length of a subsequence at least >= 2?

Thanks.

Anshuman Singh Thanks Anshuman. I figured out what the problem was. I forgot one corner case.