BHARATPE Off-Campus OA (2021) | Minimum Sum of Four Digit Number After Splitting Digits
Question · Posted Jun 2026
Problem Statement You are given a 4-digit integer num. Split its digits into two new integers such that the sum of the two integers is minimized. Return the minimum possible sum. Example Input num = 2932 Output 52 Explanation Digits = [2, 9, 3, 2] After sorting: [2, 2, 3, 9] Form: 23 and 29 Sum: 23 + 29 = 52 Constraints 1000 <= num <= 9999
The full answer & interview discussion are available to premium members.
Log in Create a free account