← reevo Interview Insights

reevo·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Did a coding round for a Software Engineer role at reevo, pretty much just one algorithmic problem the whole time. Nothing fancy, but it required you to actually know what you were doing.

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 the center-expansion trick going in, which saved me.

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 like expanding around centers or Manacher's algorithm. Explain the time and space complexity, and walk through a small example to demonstrate correctness.

Pro tip: Mention that expanding around centers is often preferred in interviews because it's easier to implement correctly under pressure, but also note Manacher's algorithm for optimal O(n) time if the interviewer wants maximum efficiency.

1. Clarify the problem

Confirm that substrings are contiguous, count each occurrence separately, and handle edge cases like empty string or single character.

2. Discuss brute force

Mention the naive O(n^3) approach of checking all substrings, but note it's inefficient and set the stage for optimization.

3. Propose efficient approach

Explain expanding around centers: for each of the 2n-1 centers (including between characters), expand while characters match, counting palindromes. This is O(n^2) time and O(1) space.

4. Analyze complexity

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

5. Walk through example

Use a short string like 'aaa' to show how the algorithm counts 6 palindromic substrings, ensuring the interviewer follows your logic.

Key Points to Mention

  • Definition of palindromic substring and counting each occurrence separately
  • Brute force O(n^3) approach and its inefficiency
  • Expanding around centers technique with 2n-1 centers
  • Time complexity O(n^2) and space complexity O(1)
  • Manacher's algorithm for O(n) time as an alternative
  • Edge cases: empty string, single character, all identical characters

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