Company: Meesho_23july
Difficulty: medium
Minimum Contrast Problem Description You are given a set of n strings S_1, S_2, ..., S_n and q queries Q_1, Q_2, ..., Q_q . Each query is a string, which may or may not be present among the n strings. For each query, print the string from the set of n strings that is at the minimum distance from the query string. The distance between two strings is the minimum number of operations required to make one string exactly equal to the other, where each operation is one of: insert one character at any position, delete one character, replace one character with another character. No other operation exists. In particular, exchanging two adjacent characters is not a single operation. If two or more strings of the set have the same minimum distance to the query, print the one that appears earliest in the input . (inferred - the source describes a tie between 2 strings; the same rule is applied to ties among any number of strings.) Each query is answered independently; the set of n strings never ch