← 返回 amazon 的题目列表Find Longest Regex
类型:online_judge
Write a function findLongestRegex to find the longest regex prototype from a given list of strings. The regex consists of characters enclosed in square brackets, and characters can be any uppercase English letters. Characters inside the brackets must be unique and without repetition.
Test Cases:
Example 1:
Input: ["AB", "AAC", "ABC"]
Output: "[ABC]"
Constraints:
1 <= strings.length <= 50
All characters are uppercase English letters
Requirements: Write efficient code.
Example
Input
["AB", "AAC", "ABC"]