Back to course home
0% completed
Vote For New Content
Valid Palindrome III (hard)
Problem Statement
Given a string s
and integer k
, return true
if string can be converted into the palindromic
string after removing at most k
characters. Otherwise, return false
.
Examples
- Example 1:
- Input:
s = "radar", k = 1
- Expected Output:
true
- Justification: The string "radar" is already a palindrome, so no characters need to be removed. Since 0 (which is less than 1) characters are removed, the output is
true
.
- Input:
- Example 2:
- Input:
s = "abracadabra", k = 5
- Expected Output:
true
- Input:
.....
.....
.....
Like the course? Get enrolled and start learning!
Table of Contents
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible