Clean✓ Java Solution🔥||🔥LeetCode BiWeekly Challenges🔥
Complexity\n- Time complexity:O(sorting)\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
# Complexity\n- Time complexity:$$O(sorting)$$\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 {\n    private boolean check(int[] nums){\n        Arrays.sort(nums);\n        return ((nums[0]+nums[1])>nums[2]);\n    }\n    \n    public String triangleType(int[] nums) {\n        \n        if(check(nums)){\n            if(nums[0]==nums[1] && nums[1]==nums[2]){\n                return "equilateral";\n            } else if((nums[0]==nums[1] && nums[1]!=nums[2]) || (nums[0]==nums[2] && nums[1]!=nums[0]) || (nums[1]==nums[2] && nums[1]!=nums[0])){\n                return "isosceles";\n            } else{\n                return "scalene";\n            }\n        }\n        return "none";\n    }\n}\n```
['Java']