Given a stream of numbers A. On arrival of each number, you need to increase its first occurence by 1 and include this in the stream.
Return the final stream of numbers.
1 <= |A| <= 100000
1 <= A[i] <= 10000
First and only argument is the array A.
Return an array, the final stream of numbers.
A = [1, 1]
A = [1, 2]
On arrival of the second element, the other element is increased by 1.
No increases are to be done.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.