C++ || EASY || Math Rule || sorting
\nclass Solution {\npublic:\n    int largestPerimeter(vector<int>& nums) \n    {\n        // as we know for creating a perfect Triangle two sides sum should be 
```\nclass Solution {\npublic:\n    int largestPerimeter(vector<int>& nums) \n    {\n        // as we know for creating a perfect Triangle two sides sum should be greater than the 3rd one\n        // a+b>c   or     a+c>b    or   b+c>a\n\t\t// now arrange values in increasing order , so no need to check for every combination\n        sort(nums.begin(),nums.end());\n        int mx = 0;\n        for(int i=0;i<nums.size()-2;i++)\n        {\n            if(nums[i]+nums[i+1]>nums[i+2]) mx = max(mx,nums[i]+nums[i+1]+nums[i+2]);\n        }\n        return mx;\n    }\n};\n```
[]