Resource · Guide or article
Palindrome Check
Defines a palindrome as a string that reads the same in both directions and lists sample inputs that pass and fail the check.
Reviewed
Open the original: Palindrome Check (opens the original site in a new tab)Practice this topicOpens the practice interviewer in Technical / coding mode; choose a question there.
Add to a roadmap
Keep this resource with a roadmap you follow. It appears as your own extra resource; the roadmap's steps don't change and it doesn't count toward your tracked steps.
Source content: English
A Palindrome is a string that reads the same forwards and backwards. This means that the second half of the string is the reverse of the first half. The following are palindromes (thus would return TRUE): The following are NOT palindromes (thus would return FALSE):
PrepKit overview
PrepKit editors wrote and reviewed this overview from the source repository. It is not text from the resource itself.
- Suited to
- The source does not state a level
- Format
- Reference
What it covers
- Five positive examples split into mirrored halves, such as rac + e + car
- Three negative examples: rad, dodo and polo
How to use it
PrepKit study advice, not a claim made by the source.
Write a two-pointer check and run it against all eight listed strings, then extend it to ignore case and spaces.
Scope and limitations
No algorithm, complexity or edge-case discussion appears here. The one reference is a GeeksForGeeks article about numeric palindromes rather than strings.
Access and format
Short README on GitHub, trekhleb/javascript-algorithms (MIT). English, free.
Reviewed by PrepKit on Oct 2, 2026. Listing source commit: 85293e3e2b88
Evidence behind this overview
- src/algorithms/string/palindrome/README.md
Pages that include this
Get the PrepKit newsletter
Optional. You don't need it to use PrepKit.