Given two arrays of digits and an integer , create the maximum number of length from digits of both arrays. The relative order within each array must be preserved. For , , , the answer is . It combines "max number from one array" with "merge two arrays maximally." Break it into subproblems. Constraint: you must preserve relative order within each array.
If and you pick , you cannot later pick without . The split must satisfy and , .