title: Red - Black Spanning Tree
body: <p>Good morning,</p>
  
  <p>I came across the following question that deals with Graphs and was not able to come up with a correct solution. I would appreciate any possible help:</p>
  
  <p>You are given a graph, some edges are black, some are red. Find a spanning tree with one restriction: if we take some node as root, every path from it to some leaf node must consist of alternating red-black-red-black edges. That is, no path from root to leaf must contain sequential black-black edges or red-red edges. 
  You are guaranteed that such spanning tree exists.</p>
  
  <p>Thanks.</p>