MCPcopy Index your code
hub / github.com/neetcode-gh/leetcode / isPalindrome

Method isPalindrome

java/0131-palindrome-partitioning.java:20–25  ·  view source on GitHub ↗
(String s, int n)

Source from the content-addressed store, hash-verified

18 }
19
20 public boolean isPalindrome(String s, int n) {
21 for (int i = 0; i < n / 2; i++) {
22 if (s.charAt(i) != s.charAt(n - i - 1)) return false;
23 }
24 return true;
25 }
26}

Callers 1

partitionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected