C++ || Easy to understand || sorting
\nclass Solution {\npublic:\n int largestPerimeter(vector<int>& nums) {\n       \n        sort(nums.begin(), nums.end(), greater<int>());\n        int ans;\n   
```\nclass Solution {\npublic:\n int largestPerimeter(vector<int>& nums) {\n       \n        sort(nums.begin(), nums.end(), greater<int>());\n        int ans;\n        \n        \n        for(int i = 0; i < nums.size()- 2; i++)\n        {\n            if(nums[i] < nums[i+1] + nums[i+2])\n            {\n                 ans = nums[i]+nums[i+1]+nums[i+2];\n                return ans;\n            }           \n        }\n     \n        return 0;\n    }\n};\n```\n
['Array', 'Sorting', 'C++']