1. Easy to understand
Approach
If it is triangle when 2 sides > remaining side.
I use for to update to Set. if size = 1: equilateral , size = 2: isosceles, size = 3: scalene
Complexi

# Approach
<!-- Describe your approach to solving the problem. -->
1. If it is triangle when 2 sides > remaining side.
2. I use for to update to Set. if size = 1: equilateral , size = 2: isosceles, size = 3: 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
```java []
class Solution {
    public String triangleType(int[] nums) {
            int A = nums[0];
            int B = nums[1];
            int C = nums[2];
            boolean isTriangle = (A+B) > C && (A + C) > B && (B + C) > A;

            if (isTriangle) {
                Set<Integer> sides = new HashSet<>();
                for (int i = 0; i < nums.length; i++) {
                    sides.add(nums[i]);
                }
                if (sides.size() == 3) {
                    return "scalene";
                } else if(sides.size() == 2) {
                    return "isosceles";
                } else {
                    return "equilateral";
                }
            } else
                return "none";
    }
}
```
['Java']