Driver Code
let arr = [ 4 , 5 , 7 , 9 , 3 ] ; let n = arr . length ; let f = new Array ( n + 1 ) ; for ( var i = 0 ; i < f . length ; i ++ ) { f [ i ] = new Array ( 2 ) ; } operations ( arr , n , f ) ;