give undirected tree consist n vertex number 1 n a frog start jump vertex 1 in second frog jump current vertex unvisited vertex directly connect the frog jump visit vertex in case frog jump vertex jump randomly probability otherwise frog jump unvisited vertex jump forever vertexthe edge undirected tree give array edge edgesi ai bi mean exist edge connect vertex ai biReturn probability t second frog vertex target Answers 105 actual answer accept Example 1input n 7 edge 121317242635 t 2 target 4Output 016666666666666666 Explanation the figure show give graph the frog start vertex 1 jump 13 probability vertex 2 second 1 jump 12 probability vertex 4 second 2 thus probability frog vertex 4 2 second 13 12 16 016666666666666666 Example 2input n 7 edge 121317242635 t 1 target 7output 03333333333333333explanation the figure show give graph the frog start vertex 1 jump 13 03333333333333333 probability vertex 7 second 1 Constraints1 n 100edgeslength n 1edgesilength 21 ai bi n1 t 501 target n