Company: Squarepoint / Hackerrank
Difficulty: medium
You are given several horizontal strips of integer-valued blocks. You may stack the strips in any order to form a grid. Each strip becomes exactly one row, and all rows are left-aligned. Every strip must be used exactly once. After the grid is built, gravity is applied. Each column settles independently: any block with an empty cell directly below it falls down by one row, repeating until that column is packed at the bottom with no gaps. Your task is to choose the order of the strips so that the final bottom row is lexicographically smallest. Definitions: Rows are ordered from top to bottom. Column 1 is the leftmost column. Let L be the maximum strip length. If a strip is shorter than L, the cells beyond its length are empty. The final bottom row contains exactly L values, one per column from 1 to L. Function Description Complete the function getSettledBottomRows in the editor below. It receives all test scenarios in a single call and returns the answer for each. Parameter Type Descrip