diff --git "a/leetcode3/\355\231\251\354\235\200\354\247\200/2525. Categorize Box According to Criteria.js" "b/leetcode3/\355\231\251\354\235\200\354\247\200/2525. Categorize Box According to Criteria.js" new file mode 100644 index 000000000..446c84cff --- /dev/null +++ "b/leetcode3/\355\231\251\354\235\200\354\247\200/2525. Categorize Box According to Criteria.js" @@ -0,0 +1,23 @@ +/** + * @param {number} length + * @param {number} width + * @param {number} height + * @param {number} mass + * @return {string} + */ +var categorizeBox = function (length, width, height, mass) { + const bulky = + length >= 10000 || + width >= 10000 || + height >= 10000 || + length * width * height >= Math.pow(10, 9); + const heavy = mass >= 100; + + if (bulky) { + if (heavy) return "Both"; + else return "Bulky"; + } else { + if (heavy) return "Heavy"; + else return "Neither"; + } +};