FastPrepIs the String a Palindrome
Problems/Is the String a Palindrome

Is the String a Palindrome

Adobe logoAdobe● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: You check whether a string reads the same from both ends, comparing characters exactly. Three Adobe first-round reports ask for this check on a string, each in a single line. The first is from a software quality engineer (automation) in Calcutta (March 2024). It is the second of two coding questions in the first of three coding rounds. The second is from a web developer in Bengaluru (November 2023). It wants the check done with a stack, in an interview that began with logic and coding basics before moving on to React. The third is from a technical manager in India (June 2022). It lists this first among four tasks. None of them gives rules for letter case, spaces or punctuation, or limits or examples.

We chose these rules. Every character counts exactly. Upper and lower case differ, and spaces and punctuation are compared like letters. Strings have 1 to 100000 printable ASCII characters. We wrote new examples. The tests see only the answer, so they cannot require a stack. The editorial's first approach uses one.

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

Given a string s, return true if it reads the same from left to right and from right to left, and false otherwise.

Compare characters exactly: an upper-case letter and its lower-case form are different characters, and spaces, digits and punctuation count like any other character.

Function

isPalindrome(s: String) → boolean

Examples

Example 1

s = "step on no pets"return = true

Reversing the string one character at a time, spaces included, gives step on no pets again, so the answer is true.

Example 2

s = "Noon"return = false

The first character N is upper case and the last character n is lower case. They are different characters, so the answer is false.

Example 3

s = "ab#ba"return = true

The pairs from the outside in are a/a and b/b, and the middle # has no partner. Every pair matches, so the answer is true.

Constraints

  • 1 <= s.length <= 10^5
  • s has only printable ASCII characters (codes 32 to 126)

More Adobe Phone Screen questions

  • Evaluate a Parenthesized Integer ExpressionPHONE SCREEN · Seen Oct 2026
  • All Elements of Two BSTs in OrderPHONE SCREEN · Seen Aug 2026
  • Rotate an Array In PlaceOA · PHONE SCREEN · Seen Aug 2026
  • Binary Tree Level-Order Traversal by LevelsPHONE SCREEN · ONSITE INTERVIEW · Seen Aug 2026
  • Count Occurrences in a Sorted ArrayPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
  • Count Pairs with Absolute Difference KPHONE SCREEN · Seen Jul 2026
  • Count Subsets with Sum KPHONE SCREEN · Seen Jul 2026
  • Numbers with Exactly Three DivisorsPHONE SCREEN · Seen Jul 2026
  • Sum of Even Nodes on a Path in a Numbered Binary TreePHONE SCREEN · Seen Jul 2026
  • Largest Value in Every Sliding WindowPHONE SCREEN · Seen Jul 2026

Similar questions at other companies

  • Valid ParenthesesByteDance · PHONE SCREENByteDance interview questions
  • Check if a String Is a PalindromeCisco · PHONE SCREENCisco interview questions
  • Halfway Course in a Single TrackCrunchyroll · PHONE SCREENCrunchyroll interview questions
  • Reverse a StringAmazon · PHONE SCREEN
  • Stack Formula InterpreterTypeSafe AI · PHONE SCREEN
  • 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
  • Validate a Bracket SequenceTripAdvisor · PHONE SCREEN

Interview reports that mention this question

  • Adobe Web, QA, DevOps, ML Roles: 13 Experiences (Part 3 of 3)
  • Adobe SWE Interviews, Level Unknown: 25 Experiences (Part 2 of 3)
  • Adobe Interviews, Level Unknown: 38 Experiences (Part 1 of 3)
  • Adobe Frontend and QA Interviews: 14 Experiences (Part 6 of 6)

Adobe interview experiences

  • Adobe New Grad MTS Interview Questions: 7 Experiences
  • Adobe ML/Research Intern Interviews: 12 Experiences (Part 4 of 4)
All Adobe interview questionsSee Adobe hiring insights
Saved
class Solution {
    public boolean isPalindrome(String s) {
        // Write your code here.
    }
}
Checking account…