def build_tree (al, nodes) :
	"""
	Takes in an adjacency list, set of all nodes, and the edge set
	and builds a tree, and contructs edges.
	al is an adjacency list
	nodes dictionary of all nodes
	edges will be the Priority Queue of all edges
	"""

	for n in al :
		for node_info in al[n] :
			e = Edge()
			e.weight    = int(node_info[1])
			e.next_node = nodes[node_info[0]]
			e.src_node  = nodes[n]
			nodes[n].neighbors.append(nodes[node_info[0]])		# append adjacent node...
			nodes[n].weights.append(e)							# and its corresponding weight