Given an array of strings words (none being a substring of another), return the length of the shortest string that contains each word as a substring. Words may overlap to save length. Input: a JSON array of strings.
Input: JSON array of strings.
Output: Integer — length of the shortest superstring.
Input: ["alex","loves","leetcode"]
Output: 17
Explanation: No overlaps possible; total length 17.Input: ["catg","ctaagt","gcta","ttca","atgcatc"]
Output: 23
Explanation: Optimal overlapping arrangement.Input: ["abc"]
Output: 3
Explanation: Single word.1<=words.length<=121<=words[i].length<=20