text: Ways to Remove Edges from a Complete Graph to make Odd Edges | C # implementation of the approach ; Function to return the number of ways to remove edges from the graph so that odd number of edges are left in the graph ; Total number of edges ; Driver code
code: using System ; public class GFG { static int countWays ( int N ) { int E = ( N * ( N - 1 ) ) / 2 ; if ( N == 1 ) return 0 ; return ( int ) Math . Pow ( 2 , E - 1 ) ; } static public void Main ( ) { int N = 4 ; Console . WriteLine ( countWays ( N ) ) ; } }