We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b366ad7 commit a220ed7Copy full SHA for a220ed7
valid-anagram/paragon0107_218.java
@@ -1,5 +1,12 @@
1
import java.util.Arrays;
2
-
+/*
3
+* 시간 복잡도:
4
+* toCharArray는 O(1)의 복잡도를 갖고 ArraySor의 경우 평균O(nlogn), 최악O(n^2)를 갖음(코테시 몇으로 계산하고 진행해야 할 지는 잘 모르겠네요..)
5
+* 공간 복잡도:
6
+* s와t를 사용해서 그대로 배열로 만들기 때문에 O(n)
7
+*
8
9
+* */
10
class Solution {
11
public static boolean isAnagram(String s, String t) {
12
char[] s1 = s.toCharArray();
0 commit comments