Calculate Difference Value
Calculate Difference Value is a Doordash coding interview problem. Given two strings, delete any characters from the second so it becomes a subsequence of the first. Using the indices of deleted characters in the second string, compute max index − min index + 1 (the difference value). Find the minimum possible value. A concise string subsequence interview question from Doordash interviews.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
