Company: sprinklr_17july
Difficulty: medium
Find the Min and Max values Problem Description You are given n digits, each between 1 and 9, and m arithmetic operators, each either + or - . Split the digits into exactly m + 1 groups so that every digit belongs to exactly one group and no group is empty. Each group becomes one number: write the digits of that group one after another, in any order you choose. The groups themselves may be formed from any digits of the list, not only from digits that are next to each other. (inferred - the source does not say whether the digits keep the order in which they are given. Its own sample builds the number 96 from the digit list 1 9 6 , so the digits may be rearranged freely.) Now write the m + 1 numbers in a row and put the m given operators between them, in the order in which they are given. The result is an arithmetic expression that uses exactly m operators, has no two operators next to each other, and has one number on each side of every operator. Over all expressions that can be built t