Java || sorting
\nclass Solution {\n    public int largestPerimeter(int[] nums) {\n        int n=nums.length;\n        Arrays.sort(nums);\n        for(int i=n-1;i>1;i--){\n    
```\nclass Solution {\n    public int largestPerimeter(int[] nums) {\n        int n=nums.length;\n        Arrays.sort(nums);\n        for(int i=n-1;i>1;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}\n```
['Array', 'Math', 'Greedy', 'Sorting', 'Java']