You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -16,73 +17,72 @@ var gardenNoAdj = function(n, paths) {
16
17
}
17
18
//if there are no gardens connecting to each other then just return an array of size n with ones
18
19
if(paths.length===0)returnnewArray(n).fill(1)
19
-
20
+
20
21
//because we have three possible paths connecting to gardens and 4 flowers we know that this problems is possible because our graph is of degree 3 and we have D + 1 flowers
21
22
//to solve
22
23
letadjList={}
23
24
// create an array filled with ones so if there is a garden with no path just fill with one
0 commit comments