- Time : O(|Ai|log(|Ai|)mul(|Ai|))
- Space : O(mul(|Ai|))
c++
1 | void helper(vector<string>& A, vector<string>& res, int p, string& now) { |