Anonymous user
Longest common substring: Difference between revisions
Explaining the difference between a substring and a subsequence.
(→C#: Tweaking comments.) |
(Explaining the difference between a substring and a subsequence.) |
||
Line 1:
{{draft task}}Write a program that prompts the user to enter two different strings, and then output their longest common substring. Note that substrings are consecutive characters within a string. This distinguishes them from subsequences, which is any sequence of characters within a string, even if there are extraneous characters in between them. Hence, the longest common subsequence between "thisisatest" and "testing123testing" is "tsitest", whereas the longest common sub''string'' is just "test".
==C#==
|