C++ - EASY - Sort & Iterate
 # Intuition  \n\n\n# Approach\n3 given sides A, B & Cform a triange iff -->>\nA + B > C\n\n\n# Complexity\n- Time complexity:O(n)\n\n\n- Space complexity:O(1)\
<!-- # Intuition -->\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n3 given sides A, B & Cform a triange iff -->>\n**A + B > C**\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:$$O(n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:$$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```C++ []\nclass Solution {\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        {\n            if (nums[i] + nums[i + 1] > nums[i + 2])\n            {\n                return nums[i] + nums[i + 1] + nums[i + 2] ; \n            }\n        }\n        return 0 ;\n    }\n};\n```\n![815a317f-9cdf-46e2-a397-af8869dafa2e_1673498197.3721023.png](https://assets.leetcode.com/users/images/2150dec5-333c-46a4-bfc8-06195ebcc357_1678340224.2938855.png)\n
['Math', 'Sorting', 'C++']