Questions › Technical PM › Top-Interview
Given a string s, return true if the s can be a palindrome after deleting at most one character from it.
- Technical PM
- Top-Interview
- Hard
- 15 min
Focus on developing an efficient algorithm to determine if the string can be a palindrome with at most one character deletion. Start by implementing a two-pointer technique: one pointer at the beginning and the other at the end of the string. As you compare characters, if they are not equal, consider two scenarios: skipping the character at the left pointer or the right pointer. Ensure you handle edge cases, such as strings of length 0 or 1, and think about the time complexity of your solution. Be prepared to discuss how you would test your solution with various string inputs.
What this question tests
- Technical PM
- Structured problem solving
- Communication
- Trade-off reasoning
Practise this question under interview conditions. Answer it out loud against a timer with an AI interviewer that asks follow-ups, then review the scored report.
Related Technical PM questions
- Write a query to find the top 3 unique salaries in each department and list all employees who have those salaries.Top-Interview · Technical PM · Medium
- Find peak element in an arrayTop-Interview · Technical PM · Medium
- Design a file cache system.Top-Interview · Technical PM · Medium
- What are the challenges in ensuring generative AI doesn’t produce harmful or unsafe content, and how would you address them?Top-Interview · Technical PM · Medium
- How would you adapt a generative AI model to perform well in a specific domain?Top-Interview · Technical PM · Medium
- How would you handle hallucinations in a generative AI model deployed to users?Top-Interview · Technical PM · Medium
All Technical PM questions · Product manager interview questions by skill area