PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates string manipulation skills and basic algorithmic competency, specifically palindrome recognition and index-based character comparison, within the Coding & Algorithms domain.

  • medium
  • Citadel
  • Coding & Algorithms
  • Software Engineer

Check whether a string is a palindrome

Company: Citadel

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

## Problem Given a string `s` consisting only of lowercase English letters (`a`-`z`), determine whether `s` is a palindrome. A palindrome reads the same forward and backward. ## Input - A single string `s`. ## Output - Return `true` if `s` is a palindrome; otherwise return `false`. ## Constraints - `1 <= |s| <= 2 * 10^5` ## Examples - Input: `s = "racecar"` → Output: `true` - Input: `s = "hello"` → Output: `false`

Quick Answer: This question evaluates string manipulation skills and basic algorithmic competency, specifically palindrome recognition and index-based character comparison, within the Coding & Algorithms domain.

Given a string `s` consisting only of lowercase English letters (`a`-`z`), determine whether `s` is a palindrome. A palindrome reads the same forward and backward. Return `True` if `s` is a palindrome; otherwise return `False`.

Constraints

  • 1 <= len(s) <= 2 * 10^5
  • s contains only lowercase English letters

Examples

Input: 'racecar'

Expected Output: True

Explanation: The string reads the same from left to right and right to left.

Input: 'hello'

Expected Output: False

Explanation: The first and last characters differ, so it is not a palindrome.

Input: 'a'

Expected Output: True

Explanation: A single character is always a palindrome.

Input: 'abba'

Expected Output: True

Explanation: The mirrored pairs are ('a','a') and ('b','b'), so the string is a palindrome.

Input: 'abca'

Expected Output: False

Explanation: The middle mirrored pair is ('b','c'), which does not match.

Hints

  1. Compare characters from the beginning and the end of the string at the same time.
  2. If any mirrored pair of characters is different, you can return `False` immediately.
Last updated: May 7, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Implement a single-producer multi-consumer ring buffer - Citadel (medium)
  • Sort a Nearly Sorted Array - Citadel (hard)
  • Compute BBO and NBBO from order data - Citadel (medium)
  • Design dynamic weighted random sampling with updates - Citadel (medium)
  • Compute maximum later-earlier difference - Citadel (medium)