Company: Amazon_15june
Difficulty: medium
Similar Substrings in Reviews Amazon shoppers often refer to user reviews to help them decide whether to purchase an item. They can focus their efforts using a keyword search, but typographical errors are common in reviews. To help mitigate this problem, Amazon\'s algorithm will include reviews that contain a word that is similar to the search term. A string, s , is similar to another string, t , if it is possible to swap two adjacent characters at most once in s to turn it into t . Given a keyword string named keyword , find how many substrings of review are similar to keyword . Note: A substring is a contiguous sequence of characters within a string. Two substrings are considered distinct if they begin at different positions. Input Format The first line contains the string keyword , the keyword to find. The second line contains the string review , the text to search. Output Format Return the number of substrings of review that are similar to keyword . Constraints keyword and review w