NeetCode #684LC-354Hard1-D Dynamic Programming
← Back to All Problems

#684 · #354 · Russian Doll Envelopes(俄罗斯套娃信封问题)

📌 Problem Statement & Constraints

You are given a 2-D array envelopes of [width, height] pairs. An envelope can be placed inside another only if both its width and height are strictly smaller. Return the maximum number of envelopes that can be nested. Constraints: 1 <= envelopes.length <= 10^5, 1 <= width_i, height_i <= 10^5.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!