FastPrepValid Palindrome II
Problems/Valid Palindrome II

Valid Palindrome II

Bloomberg LP logoBloomberg LP● EasyFULLTIMENEW GRADPHONE SCREENONSITE INTERVIEW
QuestionFunctionExamplesConstraints

Problem statement

Source note: The judged core task matches the original report at about 99%.

Given a string s, return true if it can become a palindrome after deleting at most one character. Otherwise, return false.

Function

validPalindrome(s: String) → boolean

Examples

Example 1

s = "aba"return = true

The string is already a palindrome, so no deletion is needed.

Example 2

s = "abca"return = true

Deleting b or c leaves a palindrome.

Constraints

  • 1 <= s.length <= 10^5
  • s contains only lowercase English letters.

More Bloomberg LP problems

  • Mutable Stock Price Top KPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Sparse Vector and Matrix OperationsPHONE SCREEN · Seen Oct 2026
  • Add Two Numbers IIPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public boolean validPalindrome(String s) {
        // write your code here
    }
}
Checking account…