Description:
Solution:
We use hashtable for this problem.
In hashtable, the key is the sorted value(ex. aet, ant, abt in example 1)
if keyString is not the key in table, we make the new list for it.
Then, we append s to the appropriate key.
Time Complexity: O(m*nlogn)
Space Complexity: O(n)
'LeetCode ๐๏ธ > String' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
125. Valid Palindrome (0) | 2023.06.19 |
---|---|
20. Valid Parentheses (0) | 2023.06.18 |
242. Valid Anagram (0) | 2023.06.16 |
76. Minimum Window Substring (0) | 2023.06.15 |
424. Longest Repeating Character Replacement (0) | 2023.06.14 |