Practice Split With Minimum Sum
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Reorder and distribute all decimal digit occurrences of num into representations of two nonnegative integers. Leading zeros are permitted, and every input digit occurrence must be used exactly once across the two representations. Return the smallest possible sum of their numeric values.
Source: Split With Minimum Sum on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
num = 4325
Output
59
# Example 2
Input
num = 687
Output
75
Constraints
10 <= num <= 10^9
Related LeetCode Problems
Practice more problems similar to Split With Minimum Sum.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.