Pergunta de entrevista da empresa ByteDance

Leetcode question: dynamic programming for alignment