Algorithm · Atlassian · Hard
Given an array of strings labels, return an array answer of the same length. For each i, answer[i] must be the shortest contiguous substring of labels[i] that does not occur in any of the other labels. When checking whether a substring occurs in another label, ignore letter case. The returned substring must preserve the exact casing it has in labels[i]. If multiple substrings of a label have the same shortest length, choose the one with the smallest starting index in that…
Checking your access…