Updated: 2024-03-12
1 min read
On This Page
class Solution:
def triangleType(self, nums: List[int]) -> str:
nums.sort()
if nums[0] + nums[1] <= nums[2]:
return "none"
if nums[0] == nums[2]:
return "equilateral"
if nums[0] == nums[1] or nums[1] == nums[2]:
return "isosceles"
return "scalene"