- Time:O(n^2\ell), where n = |\texttt{strs}| and \ell = \max(|\texttt{strs[i]}|)
- Space:O(\Sigma |\texttt{strs[i]}|)
C++ |
---|
|
JAVA |
---|
|
Python |
---|
|
C++ |
---|
|
JAVA |
---|
|
Python |
---|
|