Sort then O(1) space
\nfunc largestPerimeter(nums []int) int {\n    if len(nums) < 3 { return 0 }\n    \n    sort.Ints(nums)\n    \n    right := len(nums)-1\n    \n    for right >= 
```\nfunc largestPerimeter(nums []int) int {\n    if len(nums) < 3 { return 0 }\n    \n    sort.Ints(nums)\n    \n    right := len(nums)-1\n    \n    for right >= 2 {\n        if nums[right-2] > nums[right-1]-nums[right] && nums[right-2] > nums[right]-nums[right-1] {\n            return nums[right-2]+nums[right-1]+nums[right]\n        }\n        \n        right--\n    }\n        \n    return 0\n}\n```
['C', 'Python', 'Java', 'Go']