Finding Max Densitis found max densitiy of the graph