You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# You have N gardens, labelled 1 to N. In each garden, you want to plant one of 4 types of flowers.
# paths[i] = [x, y] describes the existence of a bidirectional path from garden x to garden y.
# Also, there is no garden that has more than 3 paths coming into or leaving it.
# Your task is to choose a flower type for each garden such that, for any two gardens connected by a path, they have different types of flowers.
# Return any such a choice as an array answer, where answer[i] is the type of flower planted in the (i+1)-th garden. The flower types are denoted 1, 2, 3, or 4. It is guaranteed an answer exists.