Skip to content

Latest commit

 

History

History
9 lines (9 loc) · 468 Bytes

note0241.md

File metadata and controls

9 lines (9 loc) · 468 Bytes
  • Type: Divide and conquer
  • Approach:
    • For each operation, we can split the input string as two number lists, as left and right.
    • Traverse the numbers in left and right and add the current result to our result list.
    • Memo can also be used to store the current result for saving the time complexity.
  • Complexity:
    • Time: O(n^3)
    • Space: O(n)