you give integer n denote number node weight direct graph the node number 0 n 1you give 2D integer array edge edgesi fromi toi weighti denote exist direct edge fromi toi weight weightilastly give distinct integer src1 src2 dest denote distinct node graphreturn minimum weight subgraph graph possible reach d src1 src2 set edge subgraph in case subgraph exist return 1A subgraph graph vertex edges subset original graph the weight subgraph sum weight constituent edge Example 1input n 6 edge 022056103145211233234342451 src1 0 src2 1 d 5output 9explanationthe figure represent input graphthe blue edge represent subgraph yield optimal answernote subgraph 103056 yield optimal answer it possible subgraph weight satisfy constraintsexample 2input n 3 edge 011211 src1 0 src2 1 d 2output 1explanationthe figure represent input graphit see exist path node 1 node 2 subgraph satisfy constraint Constraints3 n 1050 edgeslength 105edgesilength 30 fromi toi src1 src2 dest n 1fromi toisrc1 src2 dest pairwise distinct1 weighti 105