113: Is subsequence of a string

Given two strings: word and text, check is given word is a subsequence of the text

 

Example 1

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

Output:  true

Example 2

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

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