Given a list of strings strs, find the length of the shortest string S such that every string in strs is a subsequence of S. You may append characters to S in any order; characters cannot be reordered within each input string (subsequence relation). Return the minimum possible length of S. You may assume strings contain only lowercase English letters. This is a hard problem for multiple strings (generalized shortest common supersequence). Inputs will be moderate-sized (for example, up to ~10 strings of length up to ~20) so an exponential-in-number-of-strings dynamic search is acceptable. Implement an algorithm that returns the minimal length.
(['ab', 'bc'],)3