Initialise vis , dis , parent , preTime , and postTime
let vis = new Array ( N + 1 ) ; vis . fill ( 0 ) ; let distance = new Array ( N + 1 ) ; distance . fill ( 0 ) ; let parent = new Array ( N + 1 ) ; parent . fill ( 0 ) ; let preTime = new Array ( N + 1 ) ; preTime . fill ( 0 ) ; let postTime = new Array ( N + 1 ) ; postTime . fill ( 0 ) ;