Tap here to switch tabs
Problem
Submissions

Problem: Longest Common Prefix After at Most One Removal

med
30 min
Try to solve the Longest Common Prefix After at Most One Removal problem.

Statement

You are given two strings, s and t.

Return the maximum length of the longest common prefix shared by s and t after deleting at most 11 character from s.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • 1≤1 \leq t.length ≤105\leq 10^5

  • s and t consist only of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Longest Common Prefix After at Most One Removal

med
30 min
Try to solve the Longest Common Prefix After at Most One Removal problem.

Statement

You are given two strings, s and t.

Return the maximum length of the longest common prefix shared by s and t after deleting at most 11 character from s.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • 1≤1 \leq t.length ≤105\leq 10^5

  • s and t consist only of lowercase English letters.