method returns number of ways with which items can be arranged
function waysToArrange ( N , K , k ) { let C = new Array ( N + 1 ) ; for ( let i = 0 ; i < C . length ; i ++ ) { C [ i ] = new Array ( 2 ) ; } let i , j ;