A string with length N has N*(N+1)/2 substring in total, right? When you use memorization, you actually calculate every substring roughly. so I think the time complexity here should be O(N^2), Is that right? By the way, what's the time comlexity of dfs solution without memorization?I s that O(N!)?