https://leetcode.com/problems/kth-distinct-string-in-an-array/



Runtime: 434 ms, faster than 5.88% of TypeScript online submissions for Kth Distinct String in an Array.

Memory Usage: 50.9 MB, less than 5.88% of TypeScript online submissions for Kth Distinct String in an Array.



```typescript
function kthDistinct(arr: string[], k: number): string {
    //8:41
    let result_list = []
    for (const [index, value] of arr.entries()) {
        let ok = true
        for (const [index2, value2] of arr.entries()) {
            if (index != index2) {
                if (value == value2) {
                    ok = false
                    break
                }
            }
        }
        if (ok === true) {
            result_list.push(value)
        }
    }
    
    if (k > result_list.length) {
        return ""
    } else {
        return result_list[k-1]
    }
    //8:43
};
```
