Halloween Sale
Unlock all premium questions for over 30% off
Largest Square from Mixed Tiles
Medium
Question
You own M tiles of size 1×1 and N tiles of size 2×2. Using some of them, you want to lay out a square that is covered completely: tiles may not overlap, and no gap may be left inside the square. Your answer is how long one side of the biggest such square can be; answer 0 if you cannot build any square at all.
...
Asked at:Microsoft
More Microsoft interview questions
- Maximize Edge Label Sum in Graphmedium
- Set Even Parity Biteasy
- Design Recent Files Trackereasy
- Build the Longest Spike Sequencemedium
- Lowercase Before Uppercase Letter Countmedium
- Minimum Adjacent Swaps for Ball Groupingmedium
- Valid Clock Time Combinationsmedium
- Office Gift Delivery Schedulerhard
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.