I have an array of strings arr, and I need to find the kth distinct string in the array. If there are fewer than k distinct strings, I should return an empty string. The strings should be considered in the order in which they appear in the array.
A proper efficient solution
New contributor
VIJAYA NAARAAYANAN B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.