Company: Citi_12oct
Difficulty: medium
Two Positive Integers Sum to N Problem Description Given an integer N, you want to find two positive integers A and B such that: A + B = N neither A nor B contains any 0 in its decimal representation. Write a function: class Solution { public int[] solution(int N); } that, given an integer N, returns a two-element array containing A and B, which fulfills the criteria described above. In your solution, focus on correctness. The performance of your solution will not be the focus of the assessment. Examples Example 1: Input: N = 12 Output: [7, 5] Explanation: Some other valid results could be [5, 7], [6, 6], [4, 8], [8, 4]. It may not return [10, 2], as the first number in this pair contains a zero. Example 2: Input: N = 104 Output: [31, 73] Explanation: Some other valid results could be [62, 42] or [42, 62]. It may not return [50, 54] or [104, 0] though. Example 3: Input: N = 200 Output: [134, 66] Example 4: Input: N = 3 Output: [2, 1] Constraints N is an integer within the range [2..500