[C++] Solution : Time complexity-O(n log n), clean and concise, brute force approach
\nclass Solution {\npublic:\n    int largestPerimeter(vector<int>& nums) {\n        sort(nums.begin(),nums.end(),greater<int>());\n        for(int i=0;i<nums.si
```\nclass Solution {\npublic:\n    int largestPerimeter(vector<int>& nums) {\n        sort(nums.begin(),nums.end(),greater<int>());\n        for(int i=0;i<nums.size()-2;i++)\n             if(nums[i+2]+nums[i+1]>nums[i])\n               return nums[i+2]+nums[i+1]+nums[i];\n        return 0;\n    }\n};\n```
['C', 'Sorting', 'C++']