(RankList for this Question)
A nuclear bomb is about to go off in Mumbai and Sartaj Singh is determined to stop it. He finds a van in an abandoned parking lot, inside the van is a computer which is displaying two buttons ‘YES’ and ‘NO’. Sartaj finds a piece of paper next to the van and he thinks that it could be linked to the computer inside. Two strings \(x\) and \(y\) are printed on the paper. Sartaj has come up with a possible solution, if deleting some characters from \(y\) would result in \(x\) he should press ‘YES’ and if not then he should press ‘NO’. Help him find what button he should press to save Mumbai.
\(1 \leq\) length of string x and y \(\leq 8000\)
The first line contains the first string \(x\) and the second line contains the second string \(y\).
Print either “YES” or “NO”.
Deleting h, o, c, o, l and e would result in ‘cat’ which is the first string.
The first string cannot be obtained from the second string as it doesn’t have all the characters from the first string.
Log In to solve the Question