UVa 10340 - All in All

Summary
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
This problem is simply checking for substrings and is straightforward to implement.

Gotchas

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

Input
sequence subsequence person compression VERDI vivaVittorioEmanueleReDiItalia caseDoesMatter CaseDoesMatter

Output
Yes No Yes No