C++ solution using geometry.
Steps\n Sort the array\n Apply the geometry principe of triangle "The sum of the length of the two sides of a triangle is greater than the length of the third s
# **Steps**\n* Sort the **array**\n* Apply the geometry principe of triangle "**The sum of the length of the two sides of a triangle is greater than the length of the third side**" **A<B+C**\n* Do the reverse iteration. \n* Apply these logic `nums[i] + nums[i+1]>nums[i+2]` \n*  `nums[i] + nums[i+1]>nums[i+2]` if it is true then return `nums[i] + nums[i+1] + nums[i+2]`\n*  return `0`\n\n```\nclass Solution {\npublic:\n    int largestPerimeter(vector<int>& nums) {\n        sort(nums.begin(), nums.end());\n        for(int i= nums.size()-3;i>=0;i--){\n            if(nums[i] + nums[i+1]>nums[i+2]){\n                return nums[i] + nums[i+1] + nums[i+2];\n            }\n        }\n        return 0;\n    }\n};\n```
['Geometry', 'Sorting']