Count of distinct permutations of length N having no similar adjacent characters | C # program to implement the above approach ; Function to print the number of permutations possible ; Driver Code
using System ; class GFG { static int countofPermutations ( int N ) { return ( int ) ( 3 * Math . Pow ( 2 , N - 1 ) ) ; } public static void Main ( String [ ] args ) { int N = 5 ; Console . Write ( countofPermutations ( N ) ) ; } }