Any suggestions are highly appreciated
The input to the function/method consists of two arguments - inputstring, k
Return a list of all substrings with length of k with k-1 distinct charatcers that is there is exactly one character that is repeated once.
If no substrings are found return empty list. If multiple such strings exist return all of them without repetitions. The order in which they are returned does not matter
Constraints:
the input integer can only be greater or equal to 0 and less than or equal to 26(0<= k<=26)
the input string consists of only lower alphabetic characters only
example:
inputstring = awaglk
k = 4
output awag
inputstring = democracy
k = 5
output cracy