Company: Crayondata_14nov
Difficulty: medium
Hack Number Problem Description You are given the following: - A sentence (S1) - A string (S2) - A character (C) that can be either 'Y' or 'N' - An integer (I) A Hack number is defined as follows: - It is the first occurrence (the index of the first character) of string (S2) in sentence (S1) starting from the initial position (I) or occurring later positions (I) depending on the value of (C). - If (C) is 'Y', then the matched string (S2) must have a space to the left of it in sentence (S1) or should be at the start of (S1). It contains a space to the right of it in (S1) or should be at the end of (S1). In other words, the matched string must be an independent word in a sentence (S1). - If (C) is 'N', then there are no such conditions and it can also be inside any word of (S1). Refer to the sample test cases 2 and 3 as an example. - If no element in (S1) matches any element in (S2) after the given position (I), then print 'Goodbye Watson' without quotes. Input format - The first line co