Longest Nesting Chain of Rectangles
Asked at Google · Coding Questions · Difficulty: Hard
You are given a list of rectangles, each described as `[width, height]`. Rectangle A fits inside rectangle B when `A.width < B.width` and `A.height < B.height`, both strictly. Rectangles cannot be rotated. Find the longest sequence of rectangles in which each one fits inside the next, and return its length.
Loading the problem…
More Google interview questions
- LLM conceptual questions
- Implement a Nested Tic-Tac-Toe Game Engine
- ML Fundamentals Deep Dive (AI/ML & MLE Roles)
- ML System Design: Recsys, Chatbot, Image Classifier
- Implement Scaled Dot-Product Attention
- Meeting Rooms: Minimum Rooms to Hold All Meetings