Top "Subsequence" questions

A subsequence is a sequence obtained by deleting some elements and retaining the relative order of the remaining elements.

What is the difference between String.subString() and String.subSequence()

String.subSequence() has the following javadoc: Returns a new character sequence that is a subsequence of this sequence. An invocation …

java string substring subsequence
Given a list of numbers and a number k, return whether any two numbers from the list add up to k

This question was asked in the Google programming interview. I thought of two approaches for the same: Find all the …

arrays algorithm time-complexity dynamic-programming subsequence
Difference between subarray, subset & subsequence

I'm a bit confused between subarray, subsequence & subset if I have {1,2,3,4} then subsequence can be {1,2,4} OR {2,4} etc. So basically …

subset arrays subsequence
Number of all longest increasing subsequences

I'm practicing algorithms and one of my tasks is to count the number of all longest increasing sub-sequences for given 0 &…

algorithm numbers dynamic-programming lis subsequence