Solved with O(1) time & space complexity beats 100%.
ScreenShotApproach
used else if ladder and check in in if condition check if any two sides sum is greater than 3 side then return "none".
in else if condition c
# ScreenShot
<!-- Describe your first thoughts on how to solve this problem. -->
![image.png](https://assets.leetcode.com/users/images/c35d3453-f3bb-439a-bce6-51fc1346d735_1739886814.2968554.png)

# Approach
<!-- Describe your approach to solving the problem. -->
1. used else if ladder and check in in if condition check if any two sides sum is greater than 3 side then return "none".
2. in else if condition check all three sides are equl if they are equal then return "equilateral".
3. in another else if check two sides are equal if two sides are equal then return "isosceles".
4. in else condition return "scalene".
# Complexity
- Time complexity:O(1)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

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

# Code
```java []
class Solution {
    public String triangleType(int[] nums) {
        if(nums[0]+nums[1]<=nums[2] || nums[1]+nums[2]<=nums[0] || nums[0]+nums[2]<=nums[1]){
            return "none";
        }

        else if(nums[0]==nums[1] && nums[1]==nums[2]){
            return "equilateral";
        }
       else if(nums[0]==nums[1] || nums[1]==nums[2] || nums[0]==nums[2] ){
            return "isosceles";
        }
        else{
            return "scalene";
        }
    
    }
}
```
['Array', 'Math', 'Java']