PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Reevo

Count all palindromic substrings

Last updated: Mar 29, 2026

Quick Overview

This question evaluates proficiency with string algorithms and algorithmic problem-solving, focusing on palindrome detection and counting contiguous substrings. It is commonly asked to assess implementation skills and the ability to reason about time and space complexity within the Coding & Algorithms domain, emphasizing practical application rather than purely conceptual understanding.

  • medium
  • Reevo
  • Coding & Algorithms
  • Software Engineer

Count all palindromic substrings

Company: Reevo

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Take-home Project

Given a string `s`, count how many substrings of `s` are palindromes. - A substring is a contiguous block of characters. - A palindrome reads the same forward and backward. - Count **all** palindromic substrings (including duplicates by position). Return the total count. Constraints (typical): `1 ≤ |s| ≤ 2000` (so an `O(n^2)` approach is acceptable).

Quick Answer: This question evaluates proficiency with string algorithms and algorithmic problem-solving, focusing on palindrome detection and counting contiguous substrings. It is commonly asked to assess implementation skills and the ability to reason about time and space complexity within the Coding & Algorithms domain, emphasizing practical application rather than purely conceptual understanding.

Related Interview Questions

  • Output lexicographically largest DFS traversal - Reevo (medium)
  • Maximize weighted sum with disjoint adjacent swaps - Reevo (medium)
  • Check strings against dictionary efficiently - Reevo (Medium)
Reevo logo
Reevo
Feb 2, 2026, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
3
0

Given a string s, count how many substrings of s are palindromes.

  • A substring is a contiguous block of characters.
  • A palindrome reads the same forward and backward.
  • Count all palindromic substrings (including duplicates by position).

Return the total count.

Constraints (typical): 1 ≤ |s| ≤ 2000 (so an O(n^2) approach is acceptable).

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Reevo•More Software Engineer•Reevo Software Engineer•Reevo Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,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.