3 ms·actually the trie + dynamic programming solution is also O(n * longest dictionary word) = O(n) ...by jhp123 4y agoactually the trie + dynamic programming solution is also O(n * longest dictionary word) = O(n) ...