Available question text
Color the vertices of an undirected graph (n gardens, edges given by paths) with one of 4 flower types so that adjacent vertices have different types; since each garden has degree at most 3, a proper 4-coloring is always possible and can be found greedily.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1042. Flower Planting With No Adjacent
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source