Problem 354 · Hard

Russian Doll Envelopes

Find the largest set of envelopes that can be nested inside one another, where each must be strictly smaller in both width and height. The visual sorts the envelopes and then shows the longest increasing chain of heights.

Open the interactive visualisation