Initialise vis , dis , parent , preTime , and postTime
vis = [ 0 for i in range ( N + 1 ) ] NEW_LINE distance = [ 0 for i in range ( N + 1 ) ] NEW_LINE parent = [ 0 for i in range ( N + 1 ) ] NEW_LINE preTime = [ 0 for i in range ( N + 1 ) ] NEW_LINE postTime = [ 0 for i in range ( N + 1 ) ] NEW_LINE