This question evaluates string manipulation skills and basic algorithmic competency, specifically palindrome recognition and index-based character comparison, within the Coding & Algorithms domain.
Given a string s consisting only of lowercase English letters (a-z), determine whether s is a palindrome.
A palindrome reads the same forward and backward.
s
.
true
if
s
is a palindrome; otherwise return
false
.
1 <= |s| <= 2 * 10^5
s = "racecar"
→ Output:
true
s = "hello"
→ Output:
false