Driver code
public static void Main ( ) { int n = 5 ; int [ ] degree = { 2 , 3 , 1 , 1 , 1 } ; if ( check ( degree , n ) ) { Console . WriteLine ( " Tree " ) ; } else { Console . WriteLine ( " Graph " ) ; } } }