Shortest Unique Substring

Given an array of strings, find the shortest unique substring for each string such that these substrings are unique in the array. Return the shortest unique substring corresponding to each string.

##...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: