LeetCode solutions

2619. Categorize Box According to Criteria

My accepted Python solution to LeetCode problem 2619, Categorize Box According to Criteria, running in 0ms.

  • Difficulty: Easy
  • Python
  • Runtime 0ms
  • Memory 17.1MB

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 0ms, memory 17.1MB, accepted 2025-12-31.

python
class Solution:
    def categorizeBox(self, length: int, width: int, height: int, mass: int) -> str:
        volume = length * width * height
        
        bulky = (length >= 10**4 or width >= 10**4 or height >= 10**4 or volume >= 10**9)
        heavy = mass >= 100
        
        if bulky and heavy:
            return "Both"
        elif bulky:
            return "Bulky"
        elif heavy:
            return "Heavy"
        else:
            return "Neither"

Source