Minimum Sum Digit Split
Given a positive integer num represented as a string, find a way to split it into two non-negative integers num1 and num2 such that:
- The digits of num1 and num2 combined form a permutation of the digits of num.
- Leading zeros are allowed in num1 and num2.
- Find the split that minimizes the sum of num1 and num2. Finally, print the sum of num1 and num2.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)