Function call
let a = countingSubarray ( arr , N ) ; document . write ( " " ) ; let n = a . length - 1 ; for ( let i = 0 ; i < n ; i ++ ) document . write ( a [ i ] + " " ) ; document . write ( a [ n ] + " " ) ;