# Finding minimum and maximum sum of the given integer array

**Algorithm**

- Sort the given array in an ascending order
- Add the element from 1st position to length, which is the maximum sum of the given integer array.
- Add the element from 0th position to length — 1, which is the minimum sum of the given integer array.

**Code(JavaScript)**