FastPrepPalindrome with One Deletion
Problems/Palindrome with One Deletion

Palindrome with One Deletion

WhatNot logoWhatNot● EasyFULLTIMENEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A Senior Fullstack Engineer report describes the one-deletion palindrome task and names the same well-known problem. Our version is about 98% the same as the reported question. Our length limit is reduced to 10000 characters from the linked reference limit of 100000.

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

A palindrome reads the same from left to right and right to left. Keeping the string unchanged is allowed.

Function

validPalindrome(s: String) → boolean

Examples

Example 1

s = "abca"return = true

Deleting b gives aca; deleting c gives aba.

Example 2

s = "abc"return = false

Each possible single deletion leaves two different characters.

Example 3

s = "aba"return = true

The string is already a palindrome; no deletion is required.

Constraints

  • 1 <= s.length <= 10000.
  • s contains only lowercase English letters.

More WhatNot Phone Screen questions

  • Merge Sorted Squares of Two ArraysPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Adjacent Pair and Run RemovalPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • User Journey PathsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • User Journey Paths from a Log StreamPHONE SCREEN · Seen Nov 2026
  • Reachable Exits in an Obstacle GridPHONE SCREEN · Seen Oct 2026
  • Search a 2D MatrixPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Attraction Route Without Reusing TrailsPHONE SCREEN · Seen Sep 2026
  • Earliest Car for Each PassengerPHONE SCREEN · Seen Sep 2026
  • Minimum Stores for a Shopping ListPHONE SCREEN · Seen Sep 2026
  • Knight Dialer SequencesPHONE SCREEN · Seen Sep 2026

Similar questions at other companies

  • Run-Length Encoding and DecodingAirbnb · PHONE SCREENAirbnb interview questions
  • Check if a String Is a PalindromeCisco · PHONE SCREENCisco interview questions
  • Halfway Course in a Single TrackCrunchyroll · PHONE SCREENCrunchyroll interview questions
  • Reverse a StringAmazon · PHONE SCREEN
  • Reverse a String ManuallyNewgen Software · PHONE SCREEN
  • Reverse a String with Two PointersSnowflake · PHONE SCREENSnowflake interview questions
  • Valid Word AbbreviationMeta · PHONE SCREENMeta interview questions
  • Reverse a StringPersistent Systems · PHONE SCREEN
  • Minimum Changes for Palindromic BlocksCitadel · OA · PHONE SCREEN · ONSITE INTERVIEWCitadel interview questions
  • Valid Palindrome IIBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions

Interview reports that mention this question

  • Whatnot interviews · February 2024
  • Whatnot interviews · April 2026
  • Whatnot interviews · November 2024
  • Whatnot interviews · November 2025
  • Whatnot SWE New Grad Second Technical Interview: 8 Experiences
  • Whatnot interviews · October 2026
All WhatNot interview questionsSee WhatNot hiring insights
Saved
class Solution {
    public boolean validPalindrome(String s) {
        // write your code here
    }
}
Checking account…