Beginner Free Contest 7 - REPALIND
View as PDF
Submit solution
Points:
0.10 (partial)
Time limit:
1.0s
Memory limit:
256M
Problem type
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch
Comments
bool isPalindrome(string str) { int left = 0; int right = str.length() - 1; while (left < right) { if (str[left] != str[right]) { return false; } left++; right--; } return true; }