title: Prim and Kruskal's algorithms complexity
body: <p>Given an undirected connected graph with weights. w:E->{1,2,3,4,5,6,7} - meaning there is only 7 weights possible.
  I need to find a spanning tree using Prim's algorithm in O(n+m) and Kruskal's algorithm in O( m*a(m,n)).</p>
  
  <p>I have no idea how to do this and really need some guidance about how the weights can help me in here.</p>