Company: Trilogy_27july
Difficulty: medium
Kth Character Mismatch Pairs Problem Description You're creating a new programming language with some exciting new features! Any programming language can check if two strings are matching, but you'd like yours to be able to check if they're almost matching. More specifically, we'll say two strings are almost matching if they're equal in length and all of their corresponding characters are the same except for one. For example, "cat" and "hat" are almost matching, but "cat" and "dog" are not. For the sake of efficiency, you're planning on testing the feature by using a single string and comparing its substrings. Given a string s and an integer k , your task is to find the number of pairs of substrings of s that are almost matching but differ at their k th character (0-based). It's necessary that the length of both substrings exceeds k (otherwise the strings wouldn't have a k th character). Also note that substrings are determined by their indices, so there could potentially be multiple i