FastPrepExact Palindrome Check
Problems/Exact Palindrome Check

Exact Palindrome Check

DocuSign logoDocuSign● EasyINTERNPHONE SCREENONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Two reports asked for a palindrome check. A report from April 2022 had it in a final-round video interview, with questions on its running time and whether it could beat linear time. A report from September 2018 had it on a phone screen, right after reversing a string.

Neither report says how to treat uppercase letters, spaces or other symbols. Here every character counts exactly. Case matters and spaces are not skipped. Strings have 1 to 10^4 letters, digits and spaces. We wrote the examples. The editorial answers the question about beating linear time.

Our version is about 90% the same as the reported questions.

A string is a palindrome when reading it backward gives the same string. Given a string s, return true if it is a palindrome and false if it is not.

Take every character as it is:

  • 'K' and 'k' are different characters.
  • Nothing is skipped: a space must line up with a space, and a digit with the same digit.

Function

isExactPalindrome(s: String) → boolean

Examples

Example 1

s = "dog god"return = true

Backward, "dog god" is again "dog god". The space sits in the middle, so it matches itself. The answer is true.

Example 2

s = "Kayak"return = false

The first character is an uppercase K and the last one is a lowercase k. Case counts, so they are different and the answer is false.

Example 3

s = "top spot"return = false

Backward, the string reads "tops pot". The space is in a different place, so the answer is false.

Constraints

  • 1 <= s.length <= 10^4
  • s contains only English letters (uppercase or lowercase), digits and spaces.

More DocuSign Onsite Interview questions

  • Count Binary SubstringsONSITE INTERVIEW · Seen Sep 2026
  • Two Positions That Add Up to a TargetPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Compress Consecutive Integer RangesONSITE INTERVIEW · Seen Aug 2026
  • JSON Schema Object ValidatorONSITE INTERVIEW · Seen Aug 2026
  • Most Transactions Kept Without Going NegativeONSITE INTERVIEW · Seen May 2025
  • Three-Part Splits With a Light MiddleONSITE INTERVIEW · Seen May 2025
  • Combine Two Sorted Lists Into OneONSITE INTERVIEW · Seen Apr 2022
  • Paired Words That Share a SubstringONSITE INTERVIEW · Seen Apr 2022
  • Reverse the Characters of a TextPHONE SCREEN · ONSITE INTERVIEW · Seen Apr 2022
  • Reverse the Order of a Linked ListONSITE INTERVIEW · Seen Feb 2020

Similar questions at other companies

  • Check if a String Is a PalindromeCisco · PHONE SCREENCisco interview questions
  • Halfway Course in a Single TrackCrunchyroll · PHONE SCREENCrunchyroll interview questions
  • Longest Spoken PrefixElevenLabs · ONSITE INTERVIEWElevenLabs interview questions
  • Reverse a StringAmazon · PHONE SCREEN
  • Palindrome Check Ignoring SymbolsWalmart · ONSITE INTERVIEWWalmart interview questions
  • Reverse a String Keeping Dashes in PlaceNykaa · ONSITE INTERVIEWNykaa interview questions
  • Reverse a String ManuallyNewgen Software · PHONE SCREEN
  • Reverse a String with Two PointersSnowflake · PHONE SCREENSnowflake interview questions
  • Palindrome with One DeletionWhatNot · PHONE SCREENWhatNot interview questions
  • Valid Word AbbreviationMeta · PHONE SCREENMeta interview questions

Interview reports that mention this question

  • DocuSign SWE Intern Interviews: 27 Experiences (Part 2 of 2)

DocuSign interview experiences

  • DocuSign SWE Intern OA Questions: 53 Experiences (Part 1 of 2)
All DocuSign interview questionsSee DocuSign hiring insights
Saved
class Solution {
    public boolean isExactPalindrome(String s) {
        // Write your code here.
    }
}
Checking account…