Java implementation to find the minimum colors required to such that edges forming cycle don 't have same color
import java . util . * ; class GFG { static int n = 5 , m = 7 ; static class pair { int first , second ; public pair ( int first , int second ) { this . first = first ; this . second = second ; } }