Driver Code
var N = 2 , S = 3 ; var print = circularPermutation ( N , S ) ; document . write ( " " ) ; for ( var i = 0 ; i < print . length - 1 ; i ++ ) { document . write ( print [ i ] + " " ) ; } document . write ( print [ print . length - 1 ] + " " ) ;