[Java] ✅ ⬆️ | Simple 🔥🔥 | Clean | Self Explanatory
Complexity\nTime complexity: O(1)\nSpace complexity: O(1)\n\npublic String triangleType(int[] nums) {\n        int a = nums[0];\n        int b = nums[1];\n     
**Complexity**\nTime complexity: O(1)\nSpace complexity: O(1)\n```\npublic String triangleType(int[] nums) {\n        int a = nums[0];\n        int b = nums[1];\n        int c = nums[2];\n\n        if (isValidTriangle(a, b, c)) {\n            if (a == b && b == c) {\n                return "equilateral";\n            } else if (a == b || b == c || a == c) {\n                return "isosceles";\n            } else {\n                return "scalene";\n            }\n        } else {\n            return "none";\n        }\n    }\n\n    private boolean isValidTriangle(int a, int b, int c) {\n        return a + b > c && a + c > b && b + c > a;\n    }\n```
['Java']