UVa 10340

From Algorithmist
Jump to navigation Jump to search

10340 - All in All[edit]

Summary[edit]

Given two strings s and t, you have to decide whether s is a subsequence of t, i.e. if you can remove characters from t such that the concatenation of the remaining characters is s.

Explanation[edit]

This problem is simply checking for substrings and is straightforward to implement.

Gotchas[edit]

  • The string lengths are arbitrarly long - be sure to use a dynamically allocated buffer rather than a fixed array.

Notes[edit]

  • Anything special to note about the problem.

Implementations[edit]

Optimizations[edit]

Input[edit]

sequence subsequence
person compression
VERDI vivaVittorioEmanueleReDiItalia
caseDoesMatter CaseDoesMatter

Output[edit]

Yes
No
Yes
No

References[edit]

  1. Reference 1