You are given N positive integers, and N-1 signs. Each of the signs is either a plus ('+') or
a minus ('-'). You need to place the numbers in a sequence and then put a single sign
between each pair of integers. The goal is to get the maximum value when we evaluate
an expression. You can place the signs and the numbers in any order. Please write a few
words of your approach followed by a pseudocode algorithm and provide time
complexity for it.
Consider the following example:
Numbers: 5, 7, 9, 3
Signs: +, +, -
Output: [5+7+9-3 = 18]
Hint: (If you sort, you don’t need to write sorting algorithm, you can use the time
complexity of O(n lg n))