Solution1 遍历 + 模拟

  • 时间复杂度 $O(max(n,m))$

  • 空间复杂度 $O(n + m)$

Last updated