Check near-palindrome with one deletion
Company: Bloomberg
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: Medium
Interview Round: Technical Screen
Quick Answer: This question evaluates string manipulation and algorithmic problem-solving skills, focusing on palindromic properties and robust handling of edge cases within the Coding & Algorithms domain.
Constraints
- Inputs are provided as Python literals matching the function signature.
- Return a deterministic exact-match result.
Examples
Input: ('aba',)
Expected Output: True
Explanation: Already palindrome.
Input: ('abca',)
Expected Output: True
Explanation: Delete b or c.
Input: ('abc',)
Expected Output: False
Explanation: Impossible.
Input: ('',)
Expected Output: True
Explanation: Empty string.
Hints
- Choose a representation that makes the core operation simple.
- Handle empty and boundary inputs before the main algorithm.