Free written solution

Minimum Length of String After Deleting Similar Ends (LeetCode 1750): Solution and Explanation

Given a string of the letters a, b and c, repeatedly delete a run of one character from the front together with a run of the same character from the back, and return the shortest length you can reach.

Read the intuition, approach, code and complexity →