Graph colouring: Difference between revisions

m
m (J: slightly simpler if colors start with 0 rather than 1)
Line 786:
greedy=: {{
colors=. (#y)#a:
for_node.graphy do.
color=. <{.(-.~ [:i.1+#) ~.;node#colors
colors=. color node_index} colors
6,962

edits