Question d’entretien chez Amazon

graph coloring math puzzle next smaller element