Largest Perimeter Triangle
easy
Given an integer array nums, return the largest perimeter of a triangle with a non-zero area, formed from three of these lengths. If it is impossible to form any triangle of a non-zero area, return 0.
Constraints
3 <= nums.length <= 10^4 1 <= nums[i] <= 10^6
Format
Input
Input is managed for you
Output
Output is managed for you
Example
Sample Input
4
3 6 2 3
Sample Output
8