Pergunta de entrevista da empresa Windsurf

Asked one leetcode hard problem for OA