Abridge Interview Question

They asked me an easy-level LeetCode algorithm problem.