Quiz on String for DSA: Question 5

Last Updated :
Discuss
Comments

What is the primary difference between a substring and a subsequence of a string?

A substring and a subsequence are the same thing.

A substring is a contiguous portion of the string, while a subsequence can be obtained by deleting some or no characters from the string without changing the order of the remaining characters.

A substring is always smaller than the original string, while a subsequence can be larger.

A subsequence is a substring, but a substring is not a subsequence.

Tags:
Share your thoughts in the comments