Available question text
Given two strings where you may only add or remove characters at the ends, find the minimum number of such operations to make them identical; the core challenge is to find the longest common contiguous substring (reachable by trimming ends) and compute operations = |s1|+|s2|-2*L. This reduces to a longest-common-substring problem solvable with DP, rolling hash, or suffix structures.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3135. Equalize Strings by Adding or Removing Characters at Ends
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source