C++ Solution
Code\n\nclass Solution {\npublic:\n    int largestPerimeter(vector<int>& nums) {\n        sort(nums.rbegin(), nums.rend());\n        for(int i=0; i<nums.size()-
# Code\n```\nclass Solution {\npublic:\n    int largestPerimeter(vector<int>& nums) {\n        sort(nums.rbegin(), nums.rend());\n        for(int i=0; i<nums.size()-2; i++) {\n            if(nums[i] >= nums[i+1] + nums[i+2]) continue;\n            return nums[i] + nums[i+1] + nums[i+2];\n        }\n        return 0;\n    }\n};\n```
['C++']