📄️ 7.1 Algorithm Explanation
As the name suggests, divide and conquer problems consist of two parts: "divide" and "conquer." By breaking the original problem into subproblems and then solving and merging these subproblems, we can solve the original problem. Merge sort, introduced in the sorting chapter, is a classic example of divide and conquer. In merge sort, the "divide" step splits the array into two smaller arrays using recursion until we get multiple arrays of length 1. The "conquer" step merges two sorted arrays into a single sorted array, starting from arrays of length 1 and eventually forming the final array.
📄️ 7.2 Expression Problems
241. Different Ways to Add Parentheses
📄️ 7.3 Exercises
Basic Difficulty