triangle basic property
The solution is based on one of the basic properties of a triangle:\nThe sum of the length of any two sides of a triangle is greater than the length of the thir
The solution is based on one of the basic properties of a triangle:\n*The sum of the length of any two sides of a triangle is greater than the length of the third side.*\n\n##### Java\n```java\npublic int largestPerimeter(int[] nums) {\n        Arrays.sort(nums);\n\n        for (int i = nums.length - 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        return 0;\n    }\n```\n\n##### C++\n```c++\npublic:\n    int largestPerimeter(vector<int>& nums) {\n        sort(nums.begin(), nums.end());\n\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        return 0;\n    }\n```\n\t\n\t\n
['C', 'Java']