Count permutations of all integers upto N that can form an acyclic graph based on given conditions | C ++ implementation of above approach ; Find the count of possible graphs ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; void possibleAcyclicGraph ( int N ) { cout << pow ( 2 , N - 1 ) ; return ; } int main ( ) { int N = 4 ; possibleAcyclicGraph ( N ) ; return 0 ; }