← Reevo Interview Insights

Reevo·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Interviewed for a software engineer role at reevo and got a string problem that looked easy until I actually had to think about the edge cases.

Questions Asked (1)

Q1

Given a string, count the total number of palindromic substrings it contains. Substrings at different positions count separately even if they look identical.

Algorithms & Data Structures
Author's notes

I knew center expansion was the move but fumbled explaining why you need to handle even and odd length centers separately.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem and edge cases, then propose an efficient algorithm such as expanding around centers or Manacher's algorithm. Explain the time and space complexity, and if time permits, discuss potential optimizations or alternative approaches.

Pro tip: Mention that expanding around centers is often preferred in interviews because it's easier to implement correctly under pressure, while Manacher's algorithm, though optimal, is more complex and error-prone.

1. Clarify the problem

Ask if the string can be empty, contain special characters, and confirm that substrings are contiguous and counted by position.

2. Discuss brute force

Mention the naive O(n^3) approach of checking all substrings, but note it's inefficient for large inputs.

3. Propose efficient approach

Explain the expand-around-center method: for each character (and between characters), expand outward while characters match, counting palindromes. This is O(n^2) time and O(1) space.

4. Analyze complexity

State that the expand-around-center approach takes O(n^2) time in the worst case (e.g., all same characters) and O(1) extra space.

5. Mention optimal solution

If asked for further optimization, briefly describe Manacher's algorithm which solves the problem in O(n) time, but note its complexity.

Key Points to Mention

  • Definition of palindrome and substring
  • Expand around center technique
  • Handling both odd and even length palindromes
  • Time and space complexity analysis
  • Manacher's algorithm as an O(n) alternative
  • Edge cases: empty string, single character, all same characters

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.