Iterative construction [mp]
Micro pattern¶
Description¶
Start from a simple base object and repeatedly build a larger result.
Problems¶
Construct successive terms¶
Use the current result to generate the next row, term, or family.
- 118. Pascal's Triangle (Top Easy)
- 38. Count and Say (Top Medium)
- 78. Subsets (Top Medium)
Construct from running aggregates¶
Fill output using aggregates accumulated during ordered passes.
- 238. Product of Array Except Self (Top Hard)
- 315. Count of Smaller Numbers After Self (Top Hard)
Construct by ordered insertion¶
Insert each item into a position justified by previously placed items.
- 406. Queue Reconstruction by Height (Top Hard)
- Insertion sort linked list (DSA)