Implement the isSubsequenceText method that checks whether the smaller text appears as a subsequence inside the larger text.

The input contains two strings: small and large. Your task is to check whether small is a subsequence of large.

A subsequence keeps the original order of characters but may skip some characters. For example, abc is a subsequence of ahbgdc because a, b, and c appear in the same order.

Example 1
Input:
small (string) = abc
large (string) = ahbgdc
Return:
(boolean) true
Example 2
Input:
small (string) = axc
large (string) = ahbgdc
Return:
(boolean) false
Example 3
Input:
small (string) = ace
large (string) = abcde
Return:
(boolean) true

Use two pointers: one pointer for small and one pointer for large.

Move through large. When the current character matches the needed character from small, move the small pointer. If all characters of small are matched, return true.

Pseudocode:

function isSubsequenceText(small, large):
    i = 0
    for each character in large:
        if i < length(small) and character == small[i]:
            i++
        if i == length(small):
            return true
    return i == length(small)
Run your code to see the result.