1042. Flower Planting With No Adjacent
Description
**Input:** n = 3, paths = [[1,2],[2,3],[3,1]]
**Output:** [1,2,3]
**Explanation:**
Gardens 1 and 2 have different types.
Gardens 2 and 3 have different types.
Gardens 3 and 1 have different types.
Hence, [1,2,3] is a valid answer. Other valid answers include [1,2,4], [1,4,2], and [3,2,1].**Input:** n = 4, paths = [[1,2],[3,4]]
**Output:** [1,2,1,2]ac
Last updated