Company: sprinklr_17july
Difficulty: medium
Find the Min and Max values Problem Description You are given n digits. Each digit will be between 1 and 9 (inclusive). You are given m arithmetic operators. Each operator will be either '+' or '-'. You can combine the digits and make any numbers, one digit should be used in exactly one number. For example - if you have digits = [5, 9, 3, 3], then possible list of number are [95, 33], [593, 3], [53, 93], and many more. Now you can create an arithmetic expression using exactly given m operators. Expression is valid if it satisfies the following conditions - It should contain given m operators. No operators should be placed as adjacent. There should be one number before and after each operator. From each possible valid expression find the minimum and maximum value of the expression. Input Format First line contains one integer - the number of test cases. The first line of each test case contains one integer - number of digits. The next line contains integers - list of digits. The next li