- Time:Constructor: O(|\texttt{words}|), shortest(word1: str, word2: str): O(|\texttt{word1} + \texttt{word2}|)
- Space:O(|\texttt{word1} + \texttt{word2}|)
C++ |
---|
|
JAVA |
---|
|
Python |
---|
|