Amazon Interview Question

Find if a string is the substring of the other