Recommended Time & Space Complexity
You should aim for a solution with O(n) time and O(1) space, where n is the length of the input string.
Hint 1
A brute force solution would be to create a copy of the string, reverse it, and then check for equality. This would be an O(n) solution with extra space. Can you think of a way to do this without O(n) space?
Hint 2
Can you find the logic by observing the definition of pallindrome or from the brute force solution?
Hint 3
A palindrome string is a string that is read the same from the start as well as from the end. This means the character at the start should match the character at the end at the same index. We can use the two pointer algorithm to do this efficiently.