Hi
I frequently think of problems on my own, and try to solve them.
But this simple problem got me dazzled!
You have a set A, size N, Ai upto 109.
You play N - 1 steps on it.
Each step, pick any 2 elements x, y and remove both of them. Add back abs(x - y) to A.
Print the max value possible at end.
I was thinking that DP might solve this, but I was wrong about the approach that was coming to my mind.
Happy Coding!