Word Pattern
easy
1. You are given two strings S1 and S2. S1 represents a word of length N and S2 represents N space-separated words. 2. You have to find if the words in S2 follow the exact order as characters in S1. Note -> Every string consists of lower-case English letters only.
Constraints
1 <= length of strings <= 1000
Format
Input
Two strings S1 and S2
Output
true/false
Example
Sample Input
abab
pep coding pep coding
Sample Output
true
Question Video