Given an array of strings arr of size n, determine an array of strings answer of length n such that for each index i:
answer[i] is the shortest substring of arr[i] that does not appear as a substring in any other string in arr.
If there are multiple such shortest substrings, answer[i] is the lexicographically smallest one.
If no such substring exists, answer[i] is an empty string "".
Return the array answer.
Constraints:
n arr.length
n
arr[i].length
arr[i] consists only of lowercase English letters.
Given an array of strings arr of size n, determine an array of strings answer of length n such that for each index i:
answer[i] is the shortest substring of arr[i] that does not appear as a substring in any other string in arr.
If there are multiple such shortest substrings, answer[i] is the lexicographically smallest one.
If no such substring exists, answer[i] is an empty string "".
Return the array answer.
Constraints:
n arr.length
n
arr[i].length
arr[i] consists only of lowercase English letters.