Loading the catalog…
Loading the catalog…
https://www.hackerrank.com/contests/leetcode-bootcamp-week-1/challenges/valid-palindrome-60/problem?isFullScreen=true 문제 주어진 string 에서 문자/숫자 아닌 거 빼고 앞뒤로 똑같은지 답안 public static boolean isPalindrome(String s) { int i = 0; int j = s.length() - 1; while (i < j) { while ((i < j) && !Character.isLetterOrDigit(s.charAt(i))) { i++; } while ((i < j) && !Character.isLetterOrDigit(s.charAt(j))) { j--; } if (Character.toLowerCase(s.charAt(i)) != Character.toLowerCase(s.charAt(j))) { return false; } i++; j--; } return true; } 메모 투포인터로.. 접근은 잘 했지만 while 문 돌 때 이중 while 문에서도 i < j 를 체크해줘야 된다는 것을 까묵.. 꼼꼼히 체크해주자!!!
What RADAR observed and classified to build this opportunity. It is what the source published, not a verification that the offer is still active.
[LC BC] Valid Palindrome 60. https://www.hackerrank.com/contests/leetcode-bootcamp-week-1/challenges/valid-palindrome-60/problem?isFullScreen=true 문제 주어진 string 에서 문자/숫자 아닌 거 빼고 앞뒤로 똑같은지 답안 public static boolean isPalindrome(String s) { int i = 0; int j = s.length() - 1; while (i < j) { while ((i < j) && !Character.isLetterOrDigit(s.charAt(i))) { i++; } while ((i < j) &&…
Open sourceOpens an external website. Availability and terms may change.