2053. Kth Distinct String in an Array
Содержание
class Solution:
def kthDistinct(self, arr: List[str], k: int) -> str:
counter = Counter(arr)
for v in arr:
if counter[v] == 1:
k -= 1
if k == 0:
return v
return ''