C++ easy solution using hash table 🔥
Intuition\n Describe your first thoughts on how to solve this problem. \nwe have to check for properties -\n-> if equilateral triangle, all sides equal\n-> if i
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nwe have to check for properties -\n-> if equilateral triangle, all sides equal\n-> if isosceles triangle, two sides equal and sum of two sides are greater than third side\n-> if scalene triangle, none of the sides are equal and sum of two sides are greater than third side\n\nSo , we can store the sides of triangle in a map DS to check-\n\n  \n# Approach\n<!-- Describe your approach to solving the problem. -->\ncreate a unordered map to store the values then check for these value.\n  map size=1 means all sides are equal\n  eg - [3,3,3]  map stores -[3->3] so map size is one when all sides are equal\n  map size=2 means two sides are equal \n  eq - [5,4,4] map stores -[5->1,4->2] so map size is two when two sides are equal\n  else all sides are not equal\n\nIn scalene and isosceles , we have to check for one more condition that sum of the two sides is greater than the third side.\n# Complexity\n- Time complexity: O(1)\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```\nclass Solution {\npublic:\n    string triangleType(vector<int>& nums) {\n        unordered_map<int,int> mpp;\n        \n        mpp[nums[0]]++;\n        mpp[nums[1]]++;\n        mpp[nums[2]]++;\n        \n        if(mpp.size()==1){\n            return "equilateral";\n        }\n        else if(mpp.size()==2){\n            if(nums[0]+nums[1]>nums[2] && nums[0]+nums[2]>nums[1] && nums[2]+nums[1]>nums[0]){\n                return "isosceles";\n            }\n        }\n        else{\n            if(nums[0]+nums[1]>nums[2] && nums[0]+nums[2]>nums[1] && nums[2]+nums[1]>nums[0]){\n                return "scalene";\n            }\n        }\n        return "none";\n    }\n};\n```
['Hash Table', 'C++']