Company: Lumber_4aug
Difficulty: medium
Shortest Substring to Make Distinct Characters Problem Description Determine the length of the shortest substring to delete from a string s of length n , so that the resulting string contains only distinct characters. A substring is a sequence of characters that appear consecutively within a string. If a substring is deleted, the remaining parts of the string are joined together. If no deletion is necessary, the answer should be 0. You need to implement the function findShortestSubstring with the following parameter: s : The string to analyze. Returns: An integer representing the length of the shortest substring that should be deleted. Examples Example 1: Input: s = "abcbbck" Output: 3 Explanation: To obtain a string with only distinct characters, one optimal choice is to remove the substring "bbc" from "abcbbck". This results in "abck", which contains only distinct characters ('a', 'b', 'c', 'k'). The length of the removed substring "bbc" is 3. Example 2: Input: s = "xabbcacpqr" Outpu