Maximum Domino Removals Keeping LIS

Asked at Amazon · Coding Questions · Difficulty: Hard

`tiles` are domino sizes; `removal_order` lists positions to remove one by one; `min_order` is the minimum LIS (longest strictly increasing subsequence of remaining sizes) that must be preserved. Return the maximum number of removals possible while keeping the LIS of the remaining tiles at least `min_order`.

Loading the problem…