DECODE14 - Editorial

PROBLEM LINK:

Practice

Author: Manas Rawat
Tester: Aagam Jain
Editorialist: Manas Rawat

DIFFICULTY:

EASY

PROBLEM:

You have been given a string and you have to find whether bad is a substring of the given string or not.

QUICK EXPLANATION:

You can solve this problem by checking whether each character of bad occurs in the string or not. First check for ‘b’ then check for ‘a’ and then for ‘d’. It should be present in the same order and remember to check for the capital letters too. If all three characters are present then print YES otherwise print NO.

SOLUTIONS:

Solution can be found here.