Search⌘ K
AI Features

Append Characters to String to Make Subsequence

Explore how to determine the fewest characters to add to a source string so that a given target string becomes its subsequence. This lesson teaches you how to apply the two pointers pattern to efficiently solve this problem by assessing character order without rearranging.

Statement

You’re given two strings, source and target, made up of lowercase English ...