Count of distinct permutations of length N having no similar adjacent characters | Function to print the number of permutations possible ; Driver Code
function countofPermutations ( N ) { return parseInt ( 3 * Math . pow ( 2 , N - 1 ) ) ; } var N = 5 ; document . write ( countofPermutations ( N ) ) ;