3 ms·
I'd be tempted to treat it as a graph and approach it something like: node_colors = get_all_node_colors(G) for color in node_colors: H = prune_nodes_w
by throwaway190504 7y ago
I'd be tempted to treat it as a graph and approach it something like:
node_colors = get_all_node_colors(G)
for color in node_colors:
H = prune_nodes_with_color(G, color)
for subgraph in H:
if node_count(subgraph) > node_count(max_subgraph):
max_subgraph = subgraph