You are given cuboids where each cuboid is represented as a list of three dimensions cuboids[i] = [width_i, length_i, height_i].
Your task is to select a subset of these cuboids and stack them to achieve the maximum total height.
You can place cuboid
width_i width_j
length_i length_j
height_i height_j
You may rotate any cuboid so that any of its three dimensions can serve as width, length, or height.
Return the maximum possible total height of the stacked cuboids.
Constraints:
n cuboids.length
n
width_i, length_i, height_i
You are given cuboids where each cuboid is represented as a list of three dimensions cuboids[i] = [width_i, length_i, height_i].
Your task is to select a subset of these cuboids and stack them to achieve the maximum total height.
You can place cuboid
width_i width_j
length_i length_j
height_i height_j
You may rotate any cuboid so that any of its three dimensions can serve as width, length, or height.
Return the maximum possible total height of the stacked cuboids.
Constraints:
n cuboids.length
n
width_i, length_i, height_i