Skip to content

Commit 17666b7

Browse files
committed
valid-palindrome solution
1 parent 7cd50c8 commit 17666b7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

valid-palindrome/ohgyulim.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
class Solution {
2+
/* 시간 복잡도: O(N)
3+
* - for 루프: O(N)
4+
*
5+
* 공간 복잡도: O(N), StringBuilder
6+
*/
27
public boolean isPalindrome(String s) {
38
StringBuilder sb = new StringBuilder();
49

@@ -18,4 +23,4 @@ public boolean isPalindrome(String s) {
1823

1924
return true;
2025
}
21-
}
26+
}

0 commit comments

Comments
 (0)