Find Case Sensitive Pattern
Find Case Sensitive Pattern PROBLEM STATEMENT : The program must accept two string values S and P containing only alphabets as the input. The program must print all possible substrings of S that match the pattern P. If a substring matches the pattern P, then the case of each alphabet in the pattern P matches with the corresponding alphabet in the substring. The substrings must be printed in the order of their occurrence. If there is no such substring in S, then the program must print -1 as the output. Boundary Condition(s): 1 <= Length of P <= Length of S <= 1000 Input Format: The first line contains S. The second line contains P. Output Format: The lines, each contains a substring matches the pattern P or the first line contains -1. Example Input/Output 1: Input: ( ) SkillRack Do Output: Sk Ra Explanation: Here the given pattern is Do. The case of each alphabet in the pattern Do matches the subs...