Given a target string and a list of strings return the number of ways that
the items in the string list can be combined to build the string in the target
An example of what we want to do is:
In general it will probably be easier to create a shorter string than a longer one
We can consider a base case where:
Base Implementation
The implementation of this is pretty similar to the Can Construct problem
The complexity of this is the same as the Can Construct implementation with a time complexity O(nm∗m) and space complexity of O(m2)
With memoization
We implement the memoization as in the previous examples
The complexity of this is the same as the Can Construct memoized implementation with a time complexity O(n∗m2) and space complexity of O(m2)