Java easy solution
Triangle property : sum of any two sides must be greater than the third side.\nwe have to find out maximum perimter that\'s why we sorted array and check proper
Triangle property : sum of any two sides must be greater than the third side.\nwe have to find out maximum perimter that\'s why we sorted array and check property of triangle from last 3 elements of array if it\'s satisfied then return because it would be maximum perimeter.\n```\nclass Solution {\n    public int largestPerimeter(int[] nums) {\n        \n        Arrays.sort(nums);\n        for(int i = nums.length - 1; i >= 2; i--){\n            int first = nums[i];\n            int second = nums[i - 1];\n            int third = nums[i - 2];\n            if(second + third > first){\n                return (second + third + first);\n            }\n        }\n        return 0;\n    }\n}\n```
['Sorting', 'Java']