frequency_map to store the frequency of each string.arr and update the frequency of each string in frequency_map.distinct_count to 0 to keep track of the number of distinct strings encountered.arr again and for each string:
a. Check if the frequency of the string in frequency_map is 1.
b. If it is, increment distinct_count.
c. If distinct_count equals k, return the current string as it is the kth distinct string.k distinct strings, so return an empty string.