You are given two arrays of positive integers, boxes and warehouse, representing the heights of several boxes and the heights of warehouse[i] is the height of the
Boxes can only be moved into the warehouse from left to right. A box can be placed in room
The height of the box is less than or equal to the height of room
The height of the box is less than or equal to the heights of all preceding rooms from room
Each room can hold at most
Return the maximum number of boxes that can be placed in the warehouse.
Constraints:
n warehouse.length
boxes.length, warehouse.length
boxes[i], warehouse[i]
You are given two arrays of positive integers, boxes and warehouse, representing the heights of several boxes and the heights of warehouse[i] is the height of the
Boxes can only be moved into the warehouse from left to right. A box can be placed in room
The height of the box is less than or equal to the height of room
The height of the box is less than or equal to the heights of all preceding rooms from room
Each room can hold at most
Return the maximum number of boxes that can be placed in the warehouse.
Constraints:
n warehouse.length
boxes.length, warehouse.length
boxes[i], warehouse[i]