Python Solution with Explanation
\nclass Solution:\n    def largestPerimeter(self, A):\n        """\n        :type A: List[int]\n        :rtype: int\n        """\n        A.sort(reverse=True)\n
```\nclass Solution:\n    def largestPerimeter(self, A):\n        """\n        :type A: List[int]\n        :rtype: int\n        """\n        A.sort(reverse=True)\n        for i, x in enumerate(A[:-2]):\n            # Sum of any two sides should be greater than the third side.\n            # Consider sides: A[i], A[i+1] and A[i+2] \n            # A[i] >= A[i+1] >= A[i+2] since the list is sorted\n            # A[i] >= A[i+1] so A[i] + A[i+2] > A[i+1] and also A[i] >= A[i+2] so A[i] + A[i+1] > A[i+2] hence\n            # the only condition we need to check is that A[i] < A[i+1] + A[i+2] \n            if x < A[i+1] + A[i+2]:\n                return x + A[i+1] + A[i+2]\n\n            # Another thing to note here is that: we have reached this point that means, A[i] > A[i+1] + A[i+2]\n            # So there is no way that A[i] < A[i+1] and A[j] where j > i+2 so we need not consider all permutations\n            # of A[i], A[i+1], A[i+3] or A[i], A[i+1], A[i+4] and so on.\n\n            # Hence the next case to be considered would be A[i+1], A[i+2] and A[i+3]\n            # hence just incrementing i would do the job\n            \n        return 0\n```
[]