diff --git "a/leetcode3/\354\227\274\355\230\234\354\240\225/Code Testcase Testcase Test Result 2525. Categorize Box According to Criteria.java" "b/leetcode3/\354\227\274\355\230\234\354\240\225/Code Testcase Testcase Test Result 2525. Categorize Box According to Criteria.java" new file mode 100644 index 00000000..3c10fa1d --- /dev/null +++ "b/leetcode3/\354\227\274\355\230\234\354\240\225/Code Testcase Testcase Test Result 2525. Categorize Box According to Criteria.java" @@ -0,0 +1,23 @@ +// O(1) + +class Solution { + public String categorizeBox(int length, int width, int height, int mass) { + boolean bulky = false; + + if (length >= 10000 || width >= 10000 || height >= 10000) { + bulky = true; + } + + long volume = (long) length * width * height; + if (volume >= 1_000_000_000L) { + bulky = true; + } + + boolean heavy = mass >= 100; + + if (bulky && heavy) return "Both"; + if (bulky) return "Bulky"; + if (heavy) return "Heavy"; + return "Neither"; + } +}