Driver code
var N = 5 ; var edges = [ ] ; for ( var i = 0 ; i < MAX ; i ++ ) { adj . push ( new Array ( ) ) ; } edges . push ( new pair ( 5 , 1 ) ) ; edges . push ( new pair ( 5 , 2 ) ) ; edges . push ( new pair ( 1 , 2 ) ) ; edges . push ( new pair ( 2 , 3 ) ) ; edges . push ( new pair ( 2 , 4 ) ) ; document . write ( minNodetoRemove ( N , edges ) ) ;