Given a set of strings, A of length N.
Return the length of smallest string which has all the strings in the set as substring.
The first and the only argument has an array of strings, A.
Return an integer representing the minimum possible length of the resulting string.
1 <= N <= 18 1 <= A[i] <= 100
Input 1: A = ["aaaa", "aa"] Output 1: 4 Explanation 1: Shortest string: "aaaa" Input 2: A = ["abcd", "cdef", "fgh", "de"] Output 2: 8 Explanation 2: Shortest string: "abcdefgh"
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.