FastPrepPalindromic Substrings (LC 647 :)
Problems/Palindromic Substrings (LC 647 :)

Palindromic Substrings (LC 647 :)

Citadel logoCitadel● EasyNEW GRADOA

Updated Sep 2026

QuestionFunctionExamplesConstraints

Problem statement

Given a string s, return the number of palindromic substrings in it.

A string is a palindrome when it reads the same backward as forward.

A substring is a contiguous sequence of characters within the string.

Function

countSubstrings(s: String) → int

Examples

Example 1

s = "abc"return = 3

Three palindromic strings: "a", "b", "c".

Example 2

s = "aaa"return = 6

Six palindromic strings: "a", "a", "a", "aa", "aa", "aaa".

Constraints

  • 1 <= s.length <= 1000
  • s consists of lowercase English letters.

More Citadel interview questions

  • Portfolio Tickers with Constant-Time Random PickPHONE SCREEN · Seen Nov 2026
  • Square Root FunctionPHONE SCREEN · Seen Oct 2026
  • Reachable Transfer PositionsPHONE SCREEN · Seen Oct 2026
  • Spreadsheet Formula DependenciesPHONE SCREEN · Seen Oct 2026
  • Possible MEX Values After One Optional IncrementOA · Seen Oct 2026
  • Merge Price-Delta FeedsPHONE SCREEN · Seen Sep 2026
  • Reconcile Unmatched Trades with Timestamp TolerancePHONE SCREEN · Seen Sep 2026
  • Top Ten Trades by Notional ValuePHONE SCREEN · Seen Sep 2026
  • Busy IntersectionOA · Seen Sep 2026
  • Shortest Path in an Unweighted GraphOA · Seen Sep 2026

Similar questions at other companies

  • Palindromic SubstringsAmazon · OA
  • String Subsequences 🐳Morgan Stanley · OAMorgan Stanley interview questions
  • Lexicographically Smallest Grid Path with One Letter ChangeInfosys · OAInfosys interview questions
  • Longest Subsequence That Is a SubstringBooking.com · OA
  • Count Digit Replacements with No Equal Adjacent DigitsMicrosoft · OAMicrosoft interview questions
  • Palindrome CounterGoldman Sachs · OAGoldman Sachs interview questions
  • Longest String ChainVisa · OAVisa interview questions
  • Minimum-Cost Digit String DecodingSquadStack.ai · OA
  • Maximum Redundancy After One Segment FlipBloomberg LP · OABloomberg LP interview questions
  • String Formation (Also for AI/ML Software Engineer Intern :)Snowflake · OASnowflake interview questions

Citadel interview experiences

  • Citadel Securities Quant Researcher Intern Loop: 1 Experience
  • Citadel Securities Research Engineer Interview: 1 Experience
  • Citadel Securities SWE Intern First Round: 2 Experiences
  • Citadel Securities Experienced SWE Interviews: 1 Experience
  • Citadel SWE Intern Later Rounds and Superday: 13 Experiences
  • Citadel SWE Intern First-Round Questions: 20 Experiences
All Citadel interview questionsSee Citadel hiring insights
Saved
class Solution {
    public int countSubstrings(String s) {
      // write your code here
    }

}
Checking account…