
Bet you can’t solve this Google interview question - Yuval_Halevi
https://medium.freecodecamp.org/bet-you-cant-solve-this-google-interview-question-4a6e5a4dc8ee
======
throwaway190504
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

------
eesmith
Color me confused, but isn't this flood fill?
[https://en.wikipedia.org/wiki/Flood_fill](https://en.wikipedia.org/wiki/Flood_fill)

