You are given an array nums of three integers, representing the lengths of three sides.
Your task is to determine whether these sides can form a valid triangle.
A triangle is valid only if the sum of any two sides is greater than the remaining side.
If the triangle is valid:
It is equilateral when all three sides have the same value.
It is isosceles when exactly two sides are equal.
It is scalene when all three sides are distinct.
If the three numbers cannot satisfy the triangle inequality rule, return "none".
Input: nums = [5, 5, 8]
Output: "isosceles"
Explanation:
Two sides are equal, and it satisfies triangle rules.
Input: nums = [2, 3, 10]
Output: "none"
Explanation:
2 + 3 = 5 is NOT greater than 10 → cannot form a triangle.
Accepted:
Submission: