O(1) Python Solution Using Sets
IntuitionA set is list of distinct objects. So that can help observe how many sides are the same since a repeated side will be deleted and that could be observe
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
A set is list of distinct objects. So that can help observe how many sides are the same since a repeated side will be deleted and that could be observed in the length of the set.

# Approach
<!-- Describe your approach to solving the problem. -->
The the list of lengths is made into a set. Then first if statement is there so that it is possible the triangle can exist using the triangle inequality theorem. If the length of the set is 1 that means all the lengths are the same. That means the triangle is equilateral. If the lengths are two, then two sides are the same. That means the triangle is an isosceles. Lastly if the length is 3 all the sides are distinct. That means the triangle is scalene.

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->
$$O(1)$$

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->
$$O(1)$$

# Code
```python3 [Code]
class Solution:
    def triangleType(self, nums: List[int]) -> str:
        nums1 = set(nums)
        if (nums[0] + nums[1] <= nums[2]) or (nums[2] + nums[1] <= nums[0]) or (nums[0] + nums[2] <= nums[1]):
            return "none"
        else:
            if len(nums1) == 1:
                return "equilateral"
            elif len(nums1) == 2:
                return "isosceles"
            else:
                return "scalene"
```
['Python3']