113: Is subsequence of a string

Даны две строки: word и text проверьте является ли word подтпоследовательностью text

 

Пример 1

Input:   word = "abc", text = "abdac"

Output:  true

Пример 2

Input:   word = "abc", text = "acdaf"

Output:  false
Difficulty:Medium
Topic:Dynamic programming
Problem #:113