FastPrepCheck if a String Is a Palindrome
Problems/Check if a String Is a Palindrome

Check if a String Is a Palindrome

Cisco logoCisco● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: In a Cisco interview for a second role, the first round had a few behavioral questions and then about four coding questions. One was to check whether a string is a palindrome.

The post gives no limits or examples, and does not say how to treat case, spaces or punctuation. Here the string has 1 to 10^5 lowercase letters, and every character is compared exactly.

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

You are given a string s of lowercase English letters. Return true if s is a palindrome, and false otherwise.

A palindrome reads the same from left to right as from right to left.

Function

isPalindrome(s: String) → boolean

Examples

Example 1

s = "level"return = true

The pairs from the outside in are l and l, then e and e. The middle v has no partner. Every pair matches, so the answer is true.

Example 2

s = "router"return = false

The first letter r matches the last letter r, but o and e differ. So the answer is false.

Example 3

s = "a"return = true

A single letter reads the same both ways.

Constraints

  • 1 <= s.length <= 10^5
  • s consists of lowercase English letters.

More Cisco interview questions

  • Find Unique ElementsPHONE SCREEN · Seen Nov 2026
  • First Letter to Appear TwicePHONE SCREEN · Seen Nov 2026
  • Middle of a Linked ListPHONE SCREEN · Seen Nov 2026
  • Reverse a Linked ListPHONE SCREEN · Seen Nov 2026
  • Reverse a StringPHONE SCREEN · Seen Nov 2026
  • Valid ParenthesesPHONE SCREEN · Seen Nov 2026
  • K-Step Bit Flip with RetentionPHONE SCREEN · Seen Nov 2026
  • Longest Non-Repeating SubstringPHONE SCREEN · Seen Jul 2026
  • Todo Task Manager OperationsONSITE INTERVIEW · Seen Oct 2026
  • Find the Duplicate Number Without Modifying the ArrayONSITE INTERVIEW · Seen Sep 2026

Similar questions at other companies

  • Halfway Course in a Single TrackCrunchyroll · PHONE SCREENCrunchyroll interview questions
  • Reverse a StringAmazon · 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
  • Reverse a StringPersistent Systems · PHONE SCREEN
  • Minimum Changes for Palindromic BlocksCitadel · OA · PHONE SCREEN · ONSITE INTERVIEWCitadel interview questions
  • Valid Palindrome IIBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Reverse String In PlaceThe Walt Disney Company · OA · PHONE SCREENThe Walt Disney Company interview questions
All Cisco interview questionsSee Cisco hiring insights
Saved
class Solution {
    public boolean isPalindrome(String s) {
        // Write your code here.
    }
}
Checking account…