You have some sticks with positive integer lengths, given as an array `sticks` where `sticks[i]` is the length of the i-th stick.
You can connect any two sticks of lengths `x` and `y` into one stick of length `x + y` at a cost of `x + y`. You must keep connecting until exactly one stick remains.
Return the **minimum** total cost of connecting all the sticks into one stick. If there are fewer than two sticks, the cost is `0`.
Example 1
Input:sticks = [2,4,3]
Output:14
Explanation:Connect 2 and 3 for a cost of 5 (sticks = [5,4]), then 5 and 4 for a cost of 9. Total = 14.